/* ==========================================================================
   VedVihan in-site notifications
   Warm cream / brand-red styling that matches the public website.
   Used by website_assets/js/vv-notifications.js
   ========================================================================== */

.vv-notify-stack {
    position: fixed;
    top: 128px;
    right: 20px;
    z-index: 200000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.vv-toast {
    --vv-accent: #bb3f3d;
    --vv-soft: #fbeceb;
    --vv-duration: 4000ms;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 42px 15px 15px;
    background: #fffaf4;
    border: 1px solid rgba(187, 63, 61, 0.16);
    border-left: 4px solid var(--vv-accent);
    box-shadow: 0 14px 34px rgba(60, 53, 50, 0.16);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #3c3532;
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(26px);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.vv-toast.is-visible {
    transform: none;
    opacity: 1;
}

.vv-toast.is-leaving {
    transform: translateX(30px);
    opacity: 0;
}

.vv-toast__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--vv-soft);
    color: var(--vv-accent);
}

.vv-toast__icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.vv-toast__body {
    flex: 1 1 auto;
    min-width: 0;
}

.vv-toast__title {
    margin: 0 0 3px;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--vv-accent);
}

.vv-toast__msg {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4b433f;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.vv-toast__close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #a89d97;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.vv-toast__close:hover,
.vv-toast__close:focus {
    color: #bb3f3d;
    background: #f7ece9;
    outline: none;
}

.vv-toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--vv-accent);
    opacity: 0.35;
    transform-origin: left center;
    animation: vv-toast-progress var(--vv-duration) linear forwards;
}

.vv-toast:hover .vv-toast__progress,
.vv-toast:focus-within .vv-toast__progress {
    animation-play-state: paused;
}

@keyframes vv-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Type accents */
.vv-toast--success { --vv-accent: #2f7d5d; --vv-soft: #e9f5ef; }
.vv-toast--error { --vv-accent: #bb3f3d; --vv-soft: #fbeceb; }
.vv-toast--warning { --vv-accent: #a8741f; --vv-soft: #fcf3e1; }
.vv-toast--info { --vv-accent: #7a5c43; --vv-soft: #f4ece4; }

/* --------------------------------------------------------------------------
   Confirm dialog
   -------------------------------------------------------------------------- */

.vv-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 200001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(43, 33, 29, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vv-confirm-overlay.is-visible {
    opacity: 1;
}

.vv-confirm {
    width: min(430px, 100%);
    background: #fffdf9;
    border-top: 4px solid #bb3f3d;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
    padding: 26px 26px 22px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #3c3532;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.vv-confirm-overlay.is-visible .vv-confirm {
    transform: none;
}

.vv-confirm--danger {
    border-top-color: #bb3f3d;
}

.vv-confirm__title {
    margin: 0 0 8px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3c3532;
}

.vv-confirm__msg {
    margin: 0 0 22px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5a514c;
    white-space: pre-line;
    overflow-wrap: break-word;
}

.vv-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.vv-confirm__btn {
    border: 1px solid transparent;
    border-radius: 0;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vv-confirm__btn:focus {
    outline: 2px solid rgba(187, 63, 61, 0.35);
    outline-offset: 2px;
}

.vv-confirm__btn--cancel {
    background: transparent;
    border-color: #ddd2cc;
    color: #6b605a;
}

.vv-confirm__btn--cancel:hover {
    background: #f6f0eb;
    border-color: #cbbdb5;
}

.vv-confirm__btn--ok {
    background: #bb3f3d;
    color: #ffffff;
}

.vv-confirm__btn--ok:hover {
    background: #a33533;
}

@media (max-width: 600px) {
    .vv-notify-stack {
        top: 74px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .vv-toast {
        padding: 12px 38px 13px 12px;
    }

    .vv-confirm {
        padding: 22px 20px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vv-toast,
    .vv-confirm,
    .vv-confirm-overlay {
        transition: none;
    }

    .vv-toast {
        transform: none;
    }

    .vv-toast__progress {
        animation: none;
        opacity: 0.25;
    }
}
