/**************************************************************************
 * ¹®ÀÚ³ª¶ó °ø¿ë Progress / Loading Layer
 *
 * ÆÄÀÏ¸í : progress_layer.css
 * ¹öÀü   : Ver 0.19
 * ¼öÁ¤ÀÏ : 2026.07.27
 * ¼öÁ¤³»¿ë
 * - ÁøÇà °Ç¼ö ¶Ç´Â ÆÛ¼¾Æ®¸¦ ÁøÇà¹Ù ³»ºÎ ¿ìÃø ³¡¿¡ Ç¥½Ã
 * - ÀüÃ¼ °Ç¼ö´Â »ó´Ü ¿ä¾à ¿µ¿ª¿¡¸¸ Ç¥½Ã
 * - ¿Ï·á ½Ã ÁøÇà°ªÀº ¼û±â°í ½ÇÁ¦ ¼Ò¿ä½Ã°£Àº À¯Áö Ç¥½Ã
 * - ¼º°ø/½ÇÆÐ »óÅÂ¿¡¼­µµ ÀüÃ¼ UI »ö»óÀº ±âº» ÆÄ¶õ Å×¸¶ À¯Áö
 * - ½ÇÆÐ ½Ã °æ°í ¸Þ½ÃÁö ±ÛÀÚ¸¸ »¡°£»öÀ¸·Î Ç¥½Ã
 * - ÀüÃ¼ Å©±â, ¿©¹é, ±×¸²ÀÚ, ¸ð¼­¸®¸¦ ÁÙ¿© ½½¸²ÇÑ µðÀÚÀÎÀ¸·Î °³¼±
 * - »ó´Ü ÆÄ¶õ»ö Æ÷ÀÎÆ® ¹Ù Á¦°Å
 * - ¿Ï·á/¿À·ù È®ÀÎ ¹öÆ°À» ÁøÇà Á¤º¸ ¹Ú½º ¹ÛÀÇ ÇÏ´Ü ¿µ¿ªÀ¸·Î ÀÌµ¿
 * - È®ÀÎ ¹öÆ° Æ÷Ä¿½º ÀÌÁß ¿Ü°û¼± Á¦°Å
 * - È®ÀÎ ¹öÆ° ¾Æ·¡ÂÊ ¿©¹é È®´ë
 * - ¾ÆÀÌÄÜÀ» ÁÂÃø¿¡ µÎ°í Á¦¸ñ/¼³¸íÀ» ¿ìÃø¿¡ ¹èÄ¡
 * - ÁøÇà Áß ¿¹»ó ¼Ò¿ä½Ã°£ Ç¥½Ã º¹¿ø ¹× À¯Áö
 * - Ã³¸® °Ç¼ö¿Í ¿¹»ó ¼Ò¿ä½Ã°£ ¾Õ¿¡ EUC-KR ¾ÈÀü SVG ¾ÆÀÌÄÜ Ãß°¡
 * - È®ÀÎ ¹öÆ°À» Ä¸Ã³ ÀÌ¹ÌÁöÃ³·³ °¡º­¿î Å×µÎ¸®Çü ¹öÆ°À¸·Î º¯°æ
 * - Å¸ÀÌÆ² ±Û²ÃÀ» 15px ½Ã½ºÅÛ sans-serif, 600 ±½±â·Î Á¤¸®
 * - ¿Ï·á »óÅÂ¿¡¼­µµ ½Ã°£ ÇàÀ» À¯ÁöÇÏµµ·Ï Á¤¸®
 * - È®ÀÎ ¹öÆ°À» Ç×»ó Ç¥½ÃÇÏ°í ÁøÇà Áß¿¡´Â ºñÈ°¼ºÈ­
 * - È®ÀÎ ¹öÆ°¿¡ ÀºÀºÇÑ ¹è°æ»ö Àû¿ë
 * - Ver 0.16 µðÀÚÀÎ À¯Áö
 * - loading ¿Ï·á ½Ã¿¡µµ 100% ÁøÇà¹Ù¿Í ½ÇÁ¦ ¼Ò¿ä½Ã°£ Ç¥½Ã
 * - JavaScript Ver 0.19¿Í ¹öÀü ÀÏÄ¡
 **************************************************************************/

.progress-layer,
.progress-layer * {
    box-sizing: border-box;
}

.progress-layer[hidden],
.progress-layer [hidden] {
    display: none !important;
}

.progress-layer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(16, 24, 40, 0.34);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Apple SD Gothic Neo",
        "Malgun Gothic",
        "Segoe UI",
        sans-serif;
}

.progress-layer__box {
    position: relative;
    width: min(410px, 100%);
    overflow: hidden;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 18px 48px rgba(18, 28, 45, 0.18),
        0 3px 10px rgba(18, 28, 45, 0.08);
    animation: progress-layer-enter 0.22s cubic-bezier(.2,.8,.2,1);
}

.progress-layer__hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 26px 16px;
    text-align: left;
}

.progress-layer__icon-wrap {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 12px;
    background: #f4f6ff;
    box-shadow: inset 0 0 0 1px rgba(88, 101, 232, 0.08);
}

.progress-layer__hero-text {
    min-width: 0;
    flex: 1 1 auto;
}

.progress-layer__state-icon {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(88, 101, 232, 0.18);
    border-top-color: #5865e8;
    border-radius: 50%;
    animation: progress-layer-spin 0.82s linear infinite;
}

.progress-layer__title {
    margin: 0;
    color: #202a3b;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.progress-layer__message {
    margin: 4px 0 0;
    max-width: none;
    min-height: 20px;
    color: #747d8d;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: -0.1px;
    word-break: keep-all;
}

.progress-layer__content {
    margin: 0 14px 14px;
    padding: 17px;
    border: 1px solid #edf0f5;
    border-radius: 11px;
    background: #fafbfc;
}

.progress-layer__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.progress-layer__summary-heading {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.progress-layer__info-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #8791a3;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.progress-layer__summary-label {
    color: #7d8696;
    font-size: 12px;
    line-height: 1.5;
}

.progress-layer__summary-value {
    color: #2a3348;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: right;
}

.progress-layer__track {
    position: relative;
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ecf2;
    box-shadow: inset 0 1px 2px rgba(27, 39, 61, 0.06);
}

.progress-layer__bar {
    position: relative;
    width: 0;
    height: 100%;
    min-width: 0;
    overflow: visible;
    border-radius: inherit;
    background: linear-gradient(90deg, #5865e8, #4b8df8);
    transition: width 0.2s ease-out;
}

.progress-layer__value {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 1;
    display: none;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
}

.progress-layer__bar.has-value .progress-layer__value {
    display: block;
}

.progress-layer__value::before {
    position: absolute;
    inset: -2px -4px;
    z-index: -1;
    border-radius: 999px;
    background: rgba(60, 81, 190, 0.34);
    content: "";
}

.progress-layer__time-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
}

.progress-layer__time {
    min-width: 0;
    color: #8a93a2;
    font-size: 11px;
    line-height: 1.5;
}

.progress-layer__loading-track {
    position: relative;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ecf2;
}

.progress-layer__loading-bar {
    position: absolute;
    inset: 0 auto 0 -34%;
    width: 34%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5865e8, #4b8df8);
    animation: progress-layer-loading 1.15s cubic-bezier(.4,0,.2,1) infinite;
}

.progress-layer__loading-text {
    margin-top: 9px;
    color: #858e9e;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.progress-layer__status {
    margin-top: 13px;
    color: #667085;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.progress-layer__button-area {
    padding: 0 14px 24px;
    text-align: center;
}

.progress-layer__button {
    min-width: 78px;
    height: 32px;
    padding: 0 18px;
    border: 1px solid #d4dae4;
    border-radius: 8px;
    background: #f5f7fa;
    color: #30384a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.progress-layer__button:hover:not(:disabled) {
    border-color: #c5ccd8;
    background: #eef2f7;
}

.progress-layer__button:active:not(:disabled) {
    background: #e7ebf1;
}

.progress-layer__button:disabled {
    border-color: #e0e4eb;
    background: #f6f7f9;
    color: #a4acb8;
    cursor: default;
}

.progress-layer__button:focus,
.progress-layer__button:focus-visible {
    outline: none;
    box-shadow: none;
}

.progress-layer__value.is-complete {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: 700;
}

/* ¿Ï·á »óÅÂ: »ö»óÀº ±âº» Å×¸¶ ±×´ë·Î À¯Áö */
.progress-layer__box.is-success .progress-layer__state-icon {
    border: 0;
    border-radius: 50%;
    background: #5865e8;
    animation: none;
}

.progress-layer__box.is-success .progress-layer__state-icon::before {
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    content: "";
    transform: rotate(45deg);
}

/* ¿À·ù »óÅÂ: ÀüÃ¼ »ö»óÀº À¯ÁöÇÏ°í °æ°í ¹®±¸¸¸ »¡°£»ö */
.progress-layer__box.is-error .progress-layer__state-icon {
    border: 0;
    border-radius: 50%;
    background: #5865e8;
    animation: none;
}

.progress-layer__box.is-error .progress-layer__state-icon::before,
.progress-layer__box.is-error .progress-layer__state-icon::after {
    position: absolute;
    left: 9px;
    top: 4px;
    width: 2px;
    height: 12px;
    border-radius: 2px;
    background: #ffffff;
    content: "";
}

.progress-layer__box.is-error .progress-layer__state-icon::before {
    transform: rotate(45deg);
}

.progress-layer__box.is-error .progress-layer__state-icon::after {
    transform: rotate(-45deg);
}

.progress-layer__box.is-error .progress-layer__status {
    color: #d92d20;
}

@keyframes progress-layer-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes progress-layer-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes progress-layer-loading {
    0% {
        left: -34%;
    }

    100% {
        left: 100%;
    }
}

@media (max-width: 520px) {
    .progress-layer {
        padding: 12px;
    }

    .progress-layer__box {
        border-radius: 12px;
    }

    .progress-layer__hero {
        gap: 12px;
        padding: 20px 20px 14px;
    }

    .progress-layer__content {
        margin: 0 10px 10px;
        padding: 15px;
    }

    .progress-layer__button-area {
        padding: 0 10px 20px;
    }

    .progress-layer__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .progress-layer__box,
    .progress-layer__state-icon,
    .progress-layer__loading-bar {
        animation: none;
    }

    .progress-layer__bar,
    .progress-layer__button {
        transition: none;
    }
}

