/*--------------------------------------------------------------
# Design Tokens
--------------------------------------------------------------*/

:root {
    --font-sans:
        'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji';
}

body {
    font-family: var(--font-sans);
}

/*--------------------------------------------------------------
# Dialog Actions
--------------------------------------------------------------*/

.swal2-actions {
    gap: 12px;
    max-width: calc(100% - 40px);
}

.swal2-actions .swal2-confirm,
.swal2-actions .swal2-cancel,
.swal2-actions .swal2-deny {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    height: auto;
    min-width: 120px;
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.swal2-actions .swal2-confirm {
    color: #fff;
    background-color: #c54c13;
}

.swal2-actions .swal2-confirm:hover {
    background-color: #c54c13;
}

.swal2-actions .swal2-cancel,
.swal2-actions .swal2-deny {
    color: var(--text-color);
    background-color: transparent;
    border-color: #858b95;
}

.swal2-actions .swal2-cancel:hover,
.swal2-actions .swal2-deny:hover {
    background-color: var(--hover-bg-strong);
}

.swal2-actions .swal2-confirm.swal-action-danger {
    color: #fff;
    background-color: #c62828;
}

.swal2-actions .swal2-confirm.swal-action-danger:hover {
    background-color: #a51f1f;
}

.swal2-actions .swal2-confirm:focus,
.swal2-actions .swal2-cancel:focus,
.swal2-actions .swal2-deny:focus {
    outline: none;
    box-shadow: none;
}

.swal2-actions .swal2-confirm:focus-visible,
.swal2-actions .swal2-cancel:focus-visible,
.swal2-actions .swal2-deny:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.swal2-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .swal2-actions {
        width: calc(100% - 40px);
    }

    .swal2-actions .swal2-confirm,
    .swal2-actions .swal2-cancel,
    .swal2-actions .swal2-deny {
        flex: 1 1 100%;
        width: 100%;
    }
}

/*--------------------------------------------------------------
# Page Loading Overlay
--------------------------------------------------------------*/

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 28, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.page-loading-overlay[hidden] {
    display: none;
}

.page-loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: page-loading-spin 0.7s linear infinite;
}

@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-loading-spinner {
        animation-duration: 1.4s !important;
    }
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/*--------------------------------------------------------------
# Others
--------------------------------------------------------------*/

.back-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    margin: 20px auto 0;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.back-login:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme='light'] .back-login {
    color: var(--text-light);
}

html[data-theme='light'] .back-login:hover {
    color: var(--text-color);
    background: var(--hover-bg-strong);
}

.back-login i {
    font-size: 12px;
}
