/* ── CORE.CSS ─────────────────────────────────────────────────────────────
   Global elements loaded on all pages via base.html.
   Provides: CSS reset, base smoothing, .hidden utility,
   notification toast and confirmation modal styles for notifications.js
   ─────────────────────────────────────────────────────────────────────── */

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body { height: 100%; }

img { display: block; max-width: 100%; }

body {
    -webkit-font-smoothing: antialiased;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Notification Modal Buttons ──────────────────────────────────────────── */
/* Used by notifications.js which injects .btn and .btn-secondary in modal HTML */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #F4A24E);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #2B2B2B);
    border: 1px solid var(--color-border, #E6E3DE);
}
.btn-secondary:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Notification Toasts ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #2B2B2B);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--color-primary, #F4A24E);
    box-shadow: 0 4px 12px rgba(43, 43, 43, 0.12);
    min-width: 200px;
    animation: slideIn 0.3s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* ── Confirmation Modal (NotificationSystem.showConfirm) ─────────────────── */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(43, 43, 43, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #E6E3DE);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-backdrop.show .modal-card {
    transform: scale(1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text, #2B2B2B);
}

.modal-body {
    margin-bottom: 24px;
    color: var(--color-text-muted, #858585);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
