/* Fonts */
@font-face {
    font-family: 'Erply Ladna';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url(https://assets.erply.com/global/fonts/erply-ladna/WOFF2/ErplyLadna-Regular.woff2) format('woff2'),
    url(https://assets.erply.com/global/fonts/erply-ladna/WOFF/ErplyLadna-Regular.woff) format('woff');
}

@font-face {
    font-family: 'Erply Ladna';
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url(https://assets.erply.com/global/fonts/erply-ladna/WOFF2/ErplyLadna-Bold.woff2) format('woff2'),
    url(https://assets.erply.com/global/fonts/erply-ladna/WOFF/ErplyLadna-Bold.woff) format('woff');
}

/* Icon font */
@font-face {
    font-family: 'erply-iconfont';
    font-style: normal;
    font-weight: normal;
    font-display: block;
    src: url('https://assets.erply.com/global/fonts/erply-iconfont/erply-iconfont.woff2') format('woff2'),
    url('https://assets.erply.com/global/fonts/erply-iconfont/erply-iconfont.woff') format('woff');
}

[class^="icon-"], [class*=" icon-"] {
    font-family: 'erply-iconfont' !important;
    font-style: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.icon-Alert-Circle:before {
    content: "\e901";
}

/* Tokens */
:root {
    --body: #ffffff;
    --main-txt-clr: #1d2433;
    --accent-text-blue: #007bff;
    --grey-text: #666;
    --btn-text: #fff;
    --btn-hover: #1562CE;
    --btn-text-hover: #fff;
}
body.dark-mode {
    --body: #161a1d;
    --main-txt-clr: #ffffff;
    --accent-text-blue: #7ad0ff;
    --grey-text: #a7a8aa;
    --btn-text: #000;
    --btn-hover: #379edb;
    --btn-text-hover: #fff;
}

/* Base */
body {
    margin: 0;
    background-color: var(--body);
    min-height: 100vh;
    font-family: 'Erply Ladna', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--main-txt-clr);
}

html, body {
    height: 100%;
    overflow: hidden;
}

/*LOADER*/
.install-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Erply Ladna', sans-serif;
    padding: 2rem;
    width: 100vw;
    background-color: var(--body);
}

.install-info {
    text-align: center;
    margin-bottom: 2rem;
}

.install-appname {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
    color: var(--main-txt-clr)
}

.install-version {
    font-size: 0.95rem;
    color: var(--grey-text);
    margin-bottom: 0.5rem;
}

.install-status {
    font-size: 1rem;
    color: var(--grey-text);
    margin-top: 0.8rem;
}

.install-progress-bar {
    width: 320px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.install-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #4da8ff, var(--accent-text-blue));
    transition: width 0.3s ease;
}

.loading-wrapper {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
}

/* Percent stays solid blue */
.install-percent {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', sans-serif;
    color: var(--accent-text-blue);
    margin-bottom: 0.5rem;
}

/* Loading text shimmers */
.loading-text {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #007bff, #7ad0ff, #007bff);
    background-size: 200%;
    background-position: -100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 1s linear infinite;
}

/* Stop shimmer at 100% */
.loading-complete .loading-text {
    background: none;
    color: var(--accent-text-blue);
    animation: none;
}

@keyframes shimmer {
    to {
        background-position: 100%;
    }
}

/* ERROR SCREEN BASE */
.error-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 2rem;
    background-color: var(--body);
    color: var(--main-txt-clr);
}

.error-info {
    text-align: center;
}

/* ICON */
.error-icon {
    font-size: 3rem;
    color: var(--accent-text-blue);
    margin-bottom: 1.5rem;
}

/* HEADING AREA */
.error-main {
    font-size: 2.75rem;
    font-weight: bold;
    color: var(--accent-text-blue);
    margin-bottom: 0.25rem;
}

.error-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: -0.25rem;
    margin-bottom: 1rem;
    color: var(--main-txt-clr);
}

/* DESCRIPTION & HELP TEXT */
.error-description {
    font-size: 1rem;
    color: var(--grey-text);
    margin-bottom: 0.5rem;
}

.error-help {
    font-size: 1rem;
    color: var(--grey-text);
    margin-bottom: 2rem;
}

.error-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.error-label,
.error-code {
    color: var(--accent-text-blue);
}

.error-wrapper .loading-text {
    margin-bottom: 0 !important;
}


/* BUTTON */
.btn-start {
    color: var(--btn-text);
    background-color: var(--accent-text-blue);
    border: 1px solid var(--accent-text-blue);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.625rem 1.25rem;
    gap: 0.5rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-start:hover {
    background-color: var(--btn-hover);
    border-color: var(--btn-hover);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    color: var(--btn-text-hover);
}

/* Dark mode hover glow */
body.dark-mode .btn-start:hover {
    box-shadow:
            0 0 0 2px rgba(55, 158, 219, 0.4),
            0 4px 12px rgba(55, 158, 219, 0.3);
}

/* Light mode hover glow */
body.light-mode .btn-start:hover {
    box-shadow:
            0 0 0 2px rgba(21, 98, 206, 0.2),
            0 4px 12px rgba(21, 98, 206, 0.2);
}

@media (max-width: 1366px) {
    :root {
        --text-base: 0.875rem;
        --text-lg: 1rem;
        --text-xl: 1.125rem;
        --text-2xl: 1.25rem;
        --text-3xl: 1.5rem;
        --line-height-base: 1.5;
    }
}