/* ==========================================================================
   PATHTOESPORTS - GLOBAL TOAST BİLDİRİM SİSTEMİ (TOAST NOTIFICATION CSS)
   ==========================================================================
   Tüm alert() mesajlarının yerine geçen özel bildirim pop-up'ları.
   Renkler theme.css'den çekilir.
   ========================================================================== */

/* --- Toast Container: Ekranın sağ alt köşesi --- */
#cwl-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

/* --- Tek bir Toast kartı --- */
.cwl-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 14px 16px;
    background: var(--theme-toast-bg);
    border: 2px solid var(--theme-toast-border);
    border-radius: 10px;
    color: var(--theme-toast-text);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 12px rgba(255, 214, 31, 0.08);
    animation: cwl-toast-slide-in 0.38s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    overflow: hidden;
    word-break: break-word;
}

/* --- Slide-in animasyonu --- */
@keyframes cwl-toast-slide-in {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* --- Fade-out animasyonu (kapanırken) --- */
@keyframes cwl-toast-fade-out {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(60px) scale(0.92);
    }
}

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

/* --- Sol taraftaki hata ikonu (kırmızı ✕) --- */
.cwl-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.cwl-toast__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* --- Mesaj metni --- */
.cwl-toast__message {
    flex: 1;
    min-width: 0;
}

/* --- Sağ üst köşedeki kapatma (✕) butonu --- */
.cwl-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--theme-toast-close);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-size: 16px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cwl-toast__close:hover {
    color: var(--theme-toast-close-hover);
    transform: scale(1.15);
}

/* --- Alt kenardaki otomatik kapanma zamanlayıcı çubuğu --- */
.cwl-toast__timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--theme-toast-border);
    border-radius: 0 0 8px 8px;
    animation: cwl-toast-timer 5s linear forwards;
    opacity: 0.7;
}

@keyframes cwl-toast-timer {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* --- Responsive: Mobilde tam genişlik --- */
@media (max-width: 480px) {
    #cwl-toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    .cwl-toast {
        font-size: 0.82rem;
    }
}

/* --- Toast Tiplerine Göre Özel Tasarımlar --- */
.cwl-toast--success {
    border-color: #2ECC71;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 12px rgba(46, 204, 113, 0.15);
}
.cwl-toast--success .cwl-toast__timer-bar {
    background: #2ECC71;
}

.cwl-toast--warning {
    border-color: var(--theme-accent-yellow, #FFD61F);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 12px rgba(255, 214, 31, 0.15);
}
.cwl-toast--warning .cwl-toast__timer-bar {
    background: var(--theme-accent-yellow, #FFD61F);
}

.cwl-toast--info {
    border-color: var(--theme-accent-blue, #61A1D7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 12px rgba(97, 161, 215, 0.15);
}
.cwl-toast--info .cwl-toast__timer-bar {
    background: var(--theme-accent-blue, #61A1D7);
}
