/* =========================================================
   SweetAlert2 Custom - NR Export Document Style
========================================================= */

.nr-swal-popup {
    width: 340px !important;
    min-width: 320px !important;
    padding: 22px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.13) !important;
    font-size: 13px !important;

    --nr-alert-confirm-bg: #0f766e;
    --nr-alert-confirm-hover-bg: #0d6b64;
    --nr-alert-confirm-active-bg: #0b5d57;
}

.nr-swal-title {
    display: none !important;
}

.nr-swal-html {
    margin: 0 !important;
    padding: 0 !important;
}

.nr-swal-actions {
    margin-top: 16px !important;
    gap: 8px !important;
}

.nr-swal-confirm,
.nr-swal-cancel {
    min-width: 70px;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.nr-swal-confirm {
    background: var(--nr-alert-confirm-bg) !important;
    color: #ffffff !important;
}

.nr-swal-confirm:hover {
    background: var(--nr-alert-confirm-hover-bg) !important;
}

.nr-swal-confirm:active {
    background: var(--nr-alert-confirm-active-bg) !important;
}

/* 성공 */
.nr-swal-popup.is-success {
    --nr-alert-confirm-bg: #15803d;
    --nr-alert-confirm-hover-bg: #137437;
    --nr-alert-confirm-active-bg: #0f5f2d;
}

/* 오류 */
.nr-swal-popup.is-error {
    --nr-alert-confirm-bg: #dc2626;
    --nr-alert-confirm-hover-bg: #c81e1e;
    --nr-alert-confirm-active-bg: #b91c1c;
}

/* 경고 */
.nr-swal-popup.is-warning {
    --nr-alert-confirm-bg: #b45309;
    --nr-alert-confirm-hover-bg: #9a4306;
    --nr-alert-confirm-active-bg: #843707;
}

/* 정보 */
.nr-swal-popup.is-info {
    --nr-alert-confirm-bg: #2563eb;
    --nr-alert-confirm-hover-bg: #1d4ed8;
    --nr-alert-confirm-active-bg: #1e40af;
}

.nr-swal-cancel {
    border: 1px solid #d7dce3 !important;
    background: #ffffff !important;
    color: #475569 !important;
}

.nr-swal-cancel:hover {
    background: #f8fafc !important;
}

/* =========================================================
   Alert Icon Common
========================================================= */

.nr-alert-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(180deg, #dcfce7, #f0fdf4);
    color: #15803d;
    line-height: 1;
}

.nr-alert-icon svg {
    display: block;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nr-alert-icon.is-success,
.nr-alert-icon.is-export {
    background: linear-gradient(180deg, #dcfce7, #f0fdf4);
    color: #15803d;
}

.nr-alert-icon.is-error {
    background: linear-gradient(180deg, #fee2e2, #fff1f2);
    color: #dc2626;
}

.nr-alert-icon.is-warning {
    background: linear-gradient(180deg, #fef3c7, #fffbeb);
    color: #b45309;
}

.nr-alert-icon.is-info {
    background: linear-gradient(180deg, #dbeafe, #eff6ff);
    color: #2563eb;
}

/*
   의미용 클래스.
   실제 공통 스타일은 .nr-alert-icon에서 담당한다.
*/
.nr-alert-doc-icon,
.nr-export-progress-icon {
}

/* =========================================================
   일반 알림 본문
========================================================= */

.nr-alert-doc {
    text-align: left;
}

.nr-alert-doc-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nr-alert-doc-title {
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.nr-alert-doc-message {
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    word-break: keep-all;
}

/* =========================================================
   진행률 알림
========================================================= */

.nr-export-progress-popup {
    width: 360px !important;
    min-width: 340px !important;
    padding: 22px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.13) !important;
}

.nr-export-progress {
    text-align: left;
}

.nr-export-progress-head {
    display: flex;
    align-items: center;
    gap: 13px;
}

.nr-export-progress-title {
    margin: 0;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.035em;
}

.nr-export-progress-subtitle {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.nr-export-progress-steps {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.nr-export-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.nr-export-progress-step::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: #cbd5e1;
}

.nr-export-progress-step.is-active {
    color: #15803d;
    font-weight: 600;
}

.nr-export-progress-step.is-active::before {
    background: #22c55e;
}

.nr-export-progress-steps:empty {
    display: none;
}

.nr-export-progress-track {
    height: 9px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.nr-export-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #14b8a6;
    transition: width 0.28s ease;
}

.nr-export-progress-message {
    margin-top: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    word-break: keep-all;
}

.nr-export-progress-guide {
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    line-height: 1.45;
    word-break: keep-all;
}

/* =========================================================
   Toast
========================================================= */

.nr-toast-popup {
    --nr-toast-progress-color: #2563eb;

    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.nr-toast-popup.is-success {
    --nr-toast-progress-color: #15803d;
}

.nr-toast-popup.is-error {
    --nr-toast-progress-color: #dc2626;
}

.nr-toast-popup.is-warning {
    --nr-toast-progress-color: #b45309;
}

.nr-toast-popup.is-info {
    --nr-toast-progress-color: #2563eb;
}

.nr-toast-popup .swal2-timer-progress-bar {
    height: 3px !important;
    background: var(--nr-toast-progress-color) !important;
    opacity: 1 !important;
}

h2#swal2-title.nr-toast-title {
    color: #111827;
    font-size: .9em;
    font-weight: 700;
    text-align: left;
    margin: .5em 1em 0;
}

.nr-toast-html {
    margin: 0;
    padding: 0;
    text-align: left;
}

.nr-toast-body {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

body.swal2-toast-shown .swal2-container {
    width: 400px;
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 575px) {
    .nr-swal-popup,
    .nr-export-progress-popup {
        width: calc(100vw - 36px) !important;
        min-width: auto !important;
    }
}