/* ─── Page chrome ───
 * Shared chrome utilities used across pages: header icon badge + full-page
 * loader overlay.
 */

/* ===== Page header icon badge ===== */
.page-header__icon {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.18);
}

.page-header__icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Wrapper that keeps the icon + title block aligned horizontally */
.page-header__title-group {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* ===== Page loader overlay ===== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: page-loader-fade-in 0.2s ease-out;
}

.page-loader__spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-right-color: var(--color-primary);
    border-radius: 50%;
    animation: page-loader-spin 0.9s linear infinite;
}

.page-loader__label {
    margin-top: 16px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.2px;
    text-align: center;
}

.page-loader__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

@keyframes page-loader-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── Generic confirmation dialog ─── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: page-loader-fade-in 0.18s ease-out;
}

.confirm-dialog {
    box-sizing: border-box;
    width: min(420px, 92vw);
    padding: 28px 28px 24px;
    border-radius: var(--radius-4xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: var(--font-body);
}

.confirm-dialog__title {
    margin: 0;
    color: var(--color-slate-900);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    line-height: 24px;
}

.confirm-dialog__message {
    margin: 0;
    color: var(--color-slate-600);
    font-size: 14px;
    line-height: 20px;
}

.confirm-dialog__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.confirm-dialog__action--danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #ffffff;
}
.confirm-dialog__action--danger:hover {
    background: #d63a2c;
    border-color: #d63a2c;
}

@media (max-width: 760px) {
    .page-header__icon {
        width: 44px;
        height: 44px;
    }

    .page-header__icon svg {
        width: 24px;
        height: 24px;
    }
}
