/* ============================================
   Coache Youssra - Shared Theme Variables
   Blue & White Professional Theme
   ============================================ */
:root {
    /* Primary – Marine Blue */
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;

    /* Accent – Sky Blue */
    --accent: #0ea5e9;
    --accent-light: #e0f2fe;

    /* Gold – Elegant touch */
    --gold: #d4a017;
    --gold-light: #fef9e7;
    --gold-dark: #b8860b;

    /* Backgrounds – Clean White */
    --bg: #f8fafc;
    --bg-card: #ffffff;

    /* Text – Neutral Dark */
    --text: #1e293b;
    --text-light: #64748b;

    /* Borders */
    --border: #e2e8f0;

    /* Status */
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0ea5e9;

    /* Admin sidebar */
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
}

/* ============================================
   Inline SVG Icon System
   ============================================ */
.ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    flex-shrink: 0;
}
.ico-sm { width: 0.85em; height: 0.85em; }
.ico-lg { width: 1.25em; height: 1.25em; }
.ico-xl { width: 1.5em; height: 1.5em; }
.ico-2x { width: 2em; height: 2em; }
.ico-3x { width: 3em; height: 3em; }

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-left: 4px solid var(--primary);
    min-width: 320px;
    max-width: 440px;
    animation: toastIn 0.4s ease;
    transition: all 0.3s ease;
}
.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast-success .toast-icon { background: #f0fdf4; color: var(--success); }
.toast-error .toast-icon { background: #fef2f2; color: var(--danger); }
.toast-warning .toast-icon { background: #fffbeb; color: var(--warning); }
.toast-body { flex: 1; }
.toast-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.toast-msg {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.4;
}
.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.toast-close:hover { background: var(--bg); color: var(--text); }
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 12px 0;
    animation: toastProgress 4s linear forwards;
}
.toast-success .toast-progress { background: var(--success); }
.toast-error .toast-progress { background: var(--danger); }
.toast-warning .toast-progress { background: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================
   Confirm Popup Modal
   ============================================ */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.popup-overlay.active { display: flex; }
.popup {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    text-align: center;
    animation: popupIn 0.3s ease;
}
@keyframes popupIn {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.popup-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.popup-icon.popup-warn { background: #fef3c7; color: var(--gold-dark); }
.popup-icon.popup-danger { background: #fee2e2; color: var(--danger); }
.popup-icon.popup-info { background: var(--accent-light); color: var(--primary); }
.popup h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.popup p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.popup-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}
.popup-buttons .btn {
    min-width: 120px;
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .toast-container { top: 1rem; right: 1rem; left: 1rem; }
    .toast { min-width: auto; max-width: 100%; }
    .popup { padding: 1.5rem; }
    .popup-buttons { flex-direction: column; }
    .popup-buttons .btn { min-width: auto; width: 100%; }
}
