/* ═══════════════════════════════════════════════════════════════════════
   NOTIFICATION SYSTEM
   Unified toasts (non-blocking) + dialogs (blocking modals).
   Matches Twin Pieces romantic glassmorphism aesthetic.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────── TOAST CONTAINER ────────────────────────── */

.notification-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;        /* let clicks pass through empty space */
    max-width: 380px;
}

/* ────────────────────────────── SINGLE TOAST ──────────────────────────── */

.notification-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: auto;        /* toast itself captures clicks */
    
    /* Start off-screen (right) */
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease;
}

.notification-toast--show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast--hide {
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ── icon circle ── */
.notification-toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.notification-toast--success .notification-toast-icon {
    background: linear-gradient(135deg, #4cd137, #44bd32);
    box-shadow: 0 4px 12px rgba(76, 209, 55, 0.35);
}

.notification-toast--error .notification-toast-icon {
    background: linear-gradient(135deg, #ff4757, #e84118);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.35);
}

.notification-toast--warning .notification-toast-icon {
    background: linear-gradient(135deg, #ffa502, #ff7f00);
    box-shadow: 0 4px 12px rgba(255, 165, 2, 0.35);
}

.notification-toast--info .notification-toast-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

/* ── text ── */
.notification-toast-text {
    flex: 1;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
    font-family: 'Georgia', serif;
}

/* ── close button ── */
.notification-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    outline: none;
}

.notification-toast-close:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════════════════
   DIALOG OVERLAY (blocking full-screen modal)
   ═══════════════════════════════════════════════════════════════════════ */

.notification-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;                      /* hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.notification-dialog-overlay--show {
    display: flex;
    animation: dialogOverlayFadeIn 0.25s ease forwards;
}

.notification-dialog-overlay--hide {
    animation: dialogOverlayFadeOut 0.2s ease forwards;
}

@keyframes dialogOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes dialogOverlayFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}


/* ────────────────────────────── DIALOG CARD ───────────────────────────── */

.notification-dialog {
    background: linear-gradient(135deg,
        rgba(20, 10, 10, 0.95) 0%,
        rgba(35, 15, 15, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.35);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    width: 100%;
    max-width: 460px;
    padding: 28px;
    animation: dialogSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dialogSlideIn {
    from {
        transform: scale(0.88) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* type-specific border glow */
.notification-dialog--success { border-color: rgba(76, 209, 55, 0.45); }
.notification-dialog--error   { border-color: rgba(255, 71, 87, 0.5);  }
.notification-dialog--warning { border-color: rgba(255, 165, 2, 0.45); }
.notification-dialog--info    { border-color: rgba(52, 152, 219, 0.4); }


/* ── header (icon + title) ── */
.notification-dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.notification-dialog-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.notification-dialog--success .notification-dialog-icon {
    background: linear-gradient(135deg, #4cd137, #44bd32);
    box-shadow: 0 6px 18px rgba(76, 209, 55, 0.4);
}

.notification-dialog--error .notification-dialog-icon {
    background: linear-gradient(135deg, #ff4757, #e84118);
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.4);
}

.notification-dialog--warning .notification-dialog-icon {
    background: linear-gradient(135deg, #ffa502, #ff7f00);
    box-shadow: 0 6px 18px rgba(255, 165, 2, 0.4);
}

.notification-dialog--info .notification-dialog-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.4);
}

.notification-dialog-title {
    flex: 1;
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}


/* ── body (message + input) ── */
.notification-dialog-body {
    margin-bottom: 24px;
}

.notification-dialog-message {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 16px 0;
    font-family: 'Georgia', serif;
}

.notification-dialog-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    outline: none;
    transition: border-color 0.25s, background 0.25s;
    box-sizing: border-box;
}

.notification-dialog-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notification-dialog-input:focus {
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.2);
}


/* ── footer (buttons) ── */
.notification-dialog-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.notification-dialog-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    border: 2px solid transparent;
    min-width: 90px;
}

/* primary button (confirm, submit, yes, etc.) */
.notification-dialog-btn--primary {
    background: linear-gradient(135deg, #ff6b7a, #ff4757);
    color: #fff;
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 14px rgba(255, 71, 87, 0.35);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.notification-dialog-btn--primary:hover {
    background: linear-gradient(135deg, #ff4757, #e84118);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.5);
    transform: translateY(-2px);
}

.notification-dialog-btn--primary:active {
    transform: translateY(0);
}

/* secondary button (cancel, no, close, etc.) */
.notification-dialog-btn--secondary {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.25);
}

.notification-dialog-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.notification-dialog-btn--secondary:active {
    transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .notification-toast-container {
        top: 24px;
        right: 24px;
        max-width: 420px;
    }

    .notification-toast {
        padding: 16px 20px;
    }

    .notification-dialog {
        padding: 32px;
        max-width: 520px;
    }

    .notification-dialog-btn {
        padding: 13px 28px;
        font-size: 1.05rem;
    }
}

/* Desktop (1024px - 1399px) */
@media (max-width: 1399px) and (min-width: 1024px) {
    .notification-toast-container {
        top: 20px;
        right: 20px;
        max-width: 400px;
    }

    .notification-dialog {
        padding: 28px;
        max-width: 480px;
    }

    .notification-toast-text {
        font-size: 0.95rem;
    }

    .notification-dialog-btn {
        padding: 12px 24px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .notification-toast-container {
        top: 16px;
        right: 16px;
        max-width: 380px;
    }

    .notification-toast {
        padding: 13px 16px;
    }

    .notification-toast-icon {
        width: 30px;
        height: 30px;
        font-size: 1.05rem;
    }

    .notification-toast-text {
        font-size: 0.9rem;
    }

    .notification-dialog {
        padding: 24px;
        max-width: 440px;
        border-radius: 18px;
    }

    .notification-dialog-icon {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .notification-dialog-title {
        font-size: 1.5rem;
    }

    .notification-dialog-message {
        font-size: 0.98rem;
    }

    .notification-dialog-btn {
        padding: 11px 20px;
        font-size: 0.98rem;
    }
}

/* Mobile Landscape (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .notification-toast-container {
        top: 14px;
        right: 14px;
        left: 14px;
        max-width: none;
    }

    .notification-toast {
        padding: 12px 15px;
    }

    .notification-toast-icon {
        width: 29px;
        height: 29px;
        font-size: 1rem;
    }

    .notification-toast-text {
        font-size: 0.88rem;
    }

    .notification-dialog {
        padding: 22px;
        max-width: calc(100% - 28px);
        border-radius: 16px;
    }

    .notification-dialog-icon {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }

    .notification-dialog-title {
        font-size: 1.4rem;
    }

    .notification-dialog-message {
        font-size: 0.95rem;
    }

    .notification-dialog-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
        min-width: 80px;
    }
}

/* Mobile Portrait (375px - 599px) */
@media (max-width: 599px) and (min-width: 375px) {
    .notification-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .notification-toast {
        padding: 11px 14px;
    }

    .notification-toast-icon {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }

    .notification-toast-text {
        font-size: 0.85rem;
    }

    .notification-dialog {
        padding: 20px;
        max-width: calc(100% - 24px);
        border-radius: 15px;
    }

    .notification-dialog-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .notification-dialog-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .notification-dialog-title {
        font-size: 1.3rem;
    }

    .notification-dialog-body {
        margin-bottom: 16px;
    }

    .notification-dialog-message {
        font-size: 0.92rem;
        margin-bottom: 14px;
    }

    .notification-dialog-input {
        padding: 11px 14px;
        font-size: 0.95rem;
    }

    .notification-dialog-footer {
        flex-direction: column;
        gap: 9px;
    }

    .notification-dialog-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.93rem;
    }
}

/* Small Mobile (< 375px) */
@media (max-width: 374px) {
    .notification-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        gap: 10px;
    }

    .notification-toast {
        padding: 10px 12px;
    }

    .notification-toast-icon {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .notification-toast-text {
        font-size: 0.82rem;
    }

    .notification-toast-close {
        width: 22px;
        height: 22px;
        font-size: 1.1rem;
    }

    .notification-dialog {
        padding: 16px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }

    .notification-dialog-header {
        gap: 10px;
        margin-bottom: 14px;
    }

    .notification-dialog-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .notification-dialog-title {
        font-size: 1.2rem;
    }

    .notification-dialog-body {
        margin-bottom: 14px;
    }

    .notification-dialog-message {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .notification-dialog-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .notification-dialog-footer {
        flex-direction: column;
        gap: 8px;
    }

    .notification-dialog-btn {
        width: 100%;
        padding: 9px 14px;
        font-size: 0.88rem;
        min-width: auto;
    }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .notification-toast-container {
        top: 10px;
        right: 10px;
        max-width: 350px;
    }

    .notification-toast {
        padding: 10px 12px;
    }

    .notification-toast-icon {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .notification-toast-text {
        font-size: 0.8rem;
    }

    .notification-dialog {
        padding: 16px;
        max-width: 90%;
        border-radius: 12px;
    }

    .notification-dialog-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .notification-dialog-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .notification-dialog-title {
        font-size: 1.2rem;
    }

    .notification-dialog-message {
        font-size: 0.88rem;
    }

    .notification-dialog-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}