/* ================================================================
   AVESTA TRAVEL — Global Toast / Notification System
   Kullanım: Avesta.toast({ type, title, message, duration })
================================================================ */

/* ── Container: ekranın sağ üstü ── */
#avesta-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

/* ── Tek toast ── */
.avt {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 16px;
    background: white;
    border-radius: 14px;
    box-shadow:
        0 4px 6px rgba(0,0,0,.04),
        0 10px 40px rgba(0,0,0,.12),
        0 0 0 1px rgba(0,0,0,.05);
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    transition:
        transform .35s cubic-bezier(.34,1.56,.64,1),
        opacity   .25s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    min-width: 0;
}

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

.avt.avt-hide {
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    transition:
        transform .28s cubic-bezier(.4,0,1,1),
        opacity   .22s ease;
}

/* ── İkon ── */
.avt-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Renkler ── */
.avt-success .avt-icon { background: #f0fdf4; color: #16a34a; }
.avt-error   .avt-icon { background: #fef2f2; color: #dc2626; }
.avt-warning .avt-icon { background: #fffbeb; color: #d97706; }
.avt-info    .avt-icon { background: #eff6ff; color: #2563eb; }

.avt-success { border-left: 3.5px solid #16a34a; }
.avt-error   { border-left: 3.5px solid #dc2626; }
.avt-warning { border-left: 3.5px solid #d97706; }
.avt-info    { border-left: 3.5px solid #2563eb; }

/* ── İçerik ── */
.avt-body {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.avt-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    font-family: var(--font-body);
    margin-bottom: 2px;
}

.avt-msg {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    font-family: var(--font-body);
}

/* ── Kapat butonu ── */
.avt-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: color .15s, background .15s;
}

.avt-close:hover {
    color: #475569;
    background: #f1f5f9;
}

/* ── Progress bar ── */
.avt-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0 14px;
    width: 100%;
    transform-origin: left;
    transition: none;
}

.avt-success .avt-progress { background: #16a34a; }
.avt-error   .avt-progress { background: #dc2626; }
.avt-warning .avt-progress { background: #d97706; }
.avt-info    .avt-progress { background: #2563eb; }

/* ── Mobil ── */
@media (max-width: 480px) {
    #avesta-toast-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    .avt {
        transform: translateY(calc(100% + 32px));
    }

    .avt.avt-show {
        transform: translateY(0);
    }

    .avt.avt-hide {
        transform: translateY(calc(100% + 32px));
    }
}
