/* =============================================
   PREMIUM TOAST NOTIFICATION SYSTEM
   BookMyEvents v2
   ============================================= */

:root {
    --toast-success-bg: linear-gradient(135deg, #0f5132 0%, #198754 100%);
    --toast-error-bg: linear-gradient(135deg, #842029 0%, #dc3545 100%);
    --toast-warning-bg: linear-gradient(135deg, #664d03 0%, #ffc107 100%);
    --toast-info-bg: linear-gradient(135deg, #084298 0%, #0d6efd 100%);
    --toast-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2);
    --toast-radius: 16px;
    --toast-duration: 0.45s;
}

/* Container */
#bme-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

/* Base Toast */
.bme-toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px 18px 20px;
    border-radius: var(--toast-radius);
    box-shadow: var(--toast-shadow);
    color: #fff;
    position: relative;
    overflow: hidden;
    pointer-events: all;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Animation in */
    animation: bmeToastIn var(--toast-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: right center;
}

.bme-toast.removing {
    animation: bmeToastOut 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

/* Color Variants */
.bme-toast.success {
    background: var(--toast-success-bg);
}

.bme-toast.error {
    background: var(--toast-error-bg);
}

.bme-toast.warning {
    background: var(--toast-warning-bg);
    color: #1a1100;
}

.bme-toast.info {
    background: var(--toast-info-bg);
}

/* Gloss overlay */
.bme-toast::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 60%);
    border-radius: inherit;
    pointer-events: none;
}

/* Icon wrapper */
.bme-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    margin-top: 1px;
}

.bme-toast.warning .bme-toast-icon {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Body */
.bme-toast-body {
    flex: 1;
    min-width: 0;
}

.bme-toast-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    line-height: 1.3;
    text-transform: uppercase;
    opacity: 0.9;
}

.bme-toast.warning .bme-toast-title {
    color: #1a1100;
}

.bme-toast-message {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.95;
    word-break: break-word;
}

.bme-toast.warning .bme-toast-message {
    color: #2b1d00;
}

/* Close Button */
.bme-toast-close {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, transform 0.15s;
    margin-top: 1px;
}

.bme-toast-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.bme-toast.warning .bme-toast-close {
    background: rgba(0, 0, 0, 0.1);
    color: #2b1d00;
}

/* Progress Bar */
.bme-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 0 0 var(--toast-radius) var(--toast-radius);
    transform-origin: left;
    animation: bmeProgress linear forwards;
}

.bme-toast.warning .bme-toast-progress {
    background: rgba(0, 0, 0, 0.25);
}

/* Keyframes */
@keyframes bmeToastIn {
    0% {
        opacity: 0;
        transform: translateX(120%) scale(0.85);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes bmeToastOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 0;
    }

    60% {
        opacity: 0;
        transform: translateX(60%) scale(0.9);
    }

    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.8);
        max-height: 0;
        margin-bottom: -12px;
        padding: 0;
    }
}

@keyframes bmeProgress {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 480px) {
    #bme-toast-container {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
        max-width: 100%;
    }

    .bme-toast {
        padding: 14px 16px;
    }
}