/* =========================================================================
   EventHub Ultra-Premium Top-Right Toast & Notification Engine Styles
   ========================================================================= */

:root {
    --eh-toast-bg: rgba(15, 23, 42, 0.92);
    --eh-toast-border: rgba(255, 255, 255, 0.12);
    --eh-toast-text: #f8fafc;
    --eh-toast-muted: #94a3b8;
    
    /* Status Colors */
    --eh-toast-success: #10b981;
    --eh-toast-success-glow: rgba(16, 185, 129, 0.25);
    --eh-toast-error: #ef4444;
    --eh-toast-error-glow: rgba(239, 68, 68, 0.25);
    --eh-toast-warning: #f59e0b;
    --eh-toast-warning-glow: rgba(245, 158, 11, 0.25);
    --eh-toast-info: #8b5cf6;
    --eh-toast-info-glow: rgba(139, 92, 246, 0.25);
}

/* Toast Container in Top Right */
#eh-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 48px);
}

/* Individual Toast Card */
.eh-toast {
    position: relative;
    pointer-events: auto;
    background: var(--eh-toast-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--eh-toast-border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    user-select: none;
}

/* Slide in active state */
.eh-toast.eh-toast-visible {
    transform: translateX(0);
    opacity: 1;
}

/* Slide out state */
.eh-toast.eh-toast-hiding {
    transform: translateX(125%);
    opacity: 0;
    margin-bottom: -60px;
    pointer-events: none;
}

/* Toast Type Left Accent Line & Glowing Background */
.eh-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.eh-toast.eh-toast-success {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px var(--eh-toast-success-glow);
}
.eh-toast.eh-toast-success::before {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.eh-toast.eh-toast-error {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px var(--eh-toast-error-glow);
}
.eh-toast.eh-toast-error::before {
    background: linear-gradient(180deg, #f87171, #ef4444);
}

.eh-toast.eh-toast-warning {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px var(--eh-toast-warning-glow);
}
.eh-toast.eh-toast-warning::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.eh-toast.eh-toast-info {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px var(--eh-toast-info-glow);
}
.eh-toast.eh-toast-info::before {
    background: linear-gradient(180deg, #a78bfa, #8b5cf6);
}

/* Toast Icon Wrapper */
.eh-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    position: relative;
}

.eh-toast-success .eh-toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.eh-toast-error .eh-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.eh-toast-warning .eh-toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.eh-toast-info .eh-toast-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Toast Content */
.eh-toast-content {
    flex: 1;
    min-width: 0;
    padding-right: 6px;
}

.eh-toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--eh-toast-text);
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.eh-toast-message {
    font-size: 0.86rem;
    color: var(--eh-toast-muted);
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

/* Toast Dismiss Button */
.eh-toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: -2px;
    margin-right: -4px;
}

.eh-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Progress Countdown Bar */
.eh-toast-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.eh-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transition: transform linear;
}

.eh-toast-success .eh-toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}
.eh-toast-error .eh-toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.eh-toast-warning .eh-toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.eh-toast-info .eh-toast-progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* Hover Pauses Progress */
.eh-toast:hover .eh-toast-progress-bar {
    animation-play-state: paused !important;
}

/* =========================================================================
   EventHub Interactive Confirm Dialog (Smooth Glassmorphism Modal / Top Card)
   ========================================================================= */

#eh-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#eh-confirm-backdrop.eh-confirm-active {
    opacity: 1;
    pointer-events: auto;
}

.eh-confirm-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.15);
    border-radius: 24px;
    max-width: 460px;
    width: 100%;
    padding: 28px 24px 22px;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

#eh-confirm-backdrop.eh-confirm-active .eh-confirm-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.eh-confirm-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.eh-confirm-type-warning .eh-confirm-icon-wrap {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.eh-confirm-type-danger .eh-confirm-icon-wrap {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.eh-confirm-type-primary .eh-confirm-icon-wrap,
.eh-confirm-type-success .eh-confirm-icon-wrap {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.eh-confirm-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.eh-confirm-message {
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0 0 24px;
}

.eh-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.eh-confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.eh-confirm-btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.eh-confirm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.eh-confirm-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.eh-confirm-btn-primary:hover {
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.eh-confirm-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}
.eh-confirm-btn-danger:hover {
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.eh-confirm-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000000;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}
.eh-confirm-btn-warning:hover {
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #eh-toast-container {
        top: 14px;
        right: 12px;
        left: 12px;
        width: calc(100vw - 24px);
        max-width: none;
    }
    .eh-toast {
        padding: 14px 16px;
    }
}
