/* ============================================
   SuzoToast - Elegant Toast Notification System
   ============================================ */

.suzo-toast-container {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-height: 100vh;
    overflow: hidden;
}

.suzo-toast--top-right {
    top: 24px;
    right: 24px;
}

/* ---- Toast ---- */
.suzo-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 12px 24px -4px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.suzo-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.suzo-toast--exit {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.5, 0, 0.75, 0),
                opacity 0.35s cubic-bezier(0.5, 0, 0.75, 0);
}

/* ---- Icon ---- */
.suzo-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 1px;
}

.suzo-toast__icon svg {
    width: 100%;
    height: 100%;
}

.suzo-toast--success .suzo-toast__icon { color: #10b981; }
.suzo-toast--error .suzo-toast__icon { color: #ef4444; }
.suzo-toast--warning .suzo-toast__icon { color: #f59e0b; }
.suzo-toast--info .suzo-toast__icon { color: #3b82f6; }

/* ---- Content ---- */
.suzo-toast__content {
    flex: 1;
    min-width: 0;
}

.suzo-toast__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.45;
    word-break: break-word;
}

.suzo-toast__body {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 4px;
    word-break: break-word;
}

/* ---- Close ---- */
.suzo-toast__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin: -4px -6px -4px 0;
}

.suzo-toast__close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ---- Progress bar ---- */
.suzo-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.04);
}

.suzo-toast__progress-bar {
    height: 100%;
    border-radius: 0 0 0 14px;
    animation: suzo-toast-progress linear forwards;
}

.suzo-toast--success .suzo-toast__progress-bar { background: #10b981; }
.suzo-toast--error .suzo-toast__progress-bar { background: #ef4444; }
.suzo-toast--warning .suzo-toast__progress-bar { background: #f59e0b; }
.suzo-toast--info .suzo-toast__progress-bar { background: #3b82f6; }

@keyframes suzo-toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ---- Left accent border ---- */
.suzo-toast--success { border-left: 4px solid #10b981; }
.suzo-toast--error { border-left: 4px solid #ef4444; }
.suzo-toast--warning { border-left: 4px solid #f59e0b; }
.suzo-toast--info { border-left: 4px solid #3b82f6; }

/* ============================================
   Confirm Dialog
   ============================================ */

.suzo-toast-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.suzo-toast-overlay--visible {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.suzo-toast-dialog {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 400px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.suzo-toast-dialog--visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.suzo-toast-dialog__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.suzo-toast-dialog__icon svg {
    width: 100%;
    height: 100%;
}

.suzo-toast-dialog__icon--confirm {
    background: #eff6ff;
    color: #3b82f6;
}

.suzo-toast-dialog__icon--warning {
    background: #fffbeb;
    color: #f59e0b;
}

.suzo-toast-dialog__icon--error {
    background: #fef2f2;
    color: #ef4444;
}

.suzo-toast-dialog__icon--info {
    background: #eff6ff;
    color: #3b82f6;
}

.suzo-toast-dialog__icon--success {
    background: #ecfdf5;
    color: #10b981;
}

.suzo-toast-dialog__title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
}

.suzo-toast-dialog__body {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.suzo-toast-dialog__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.suzo-toast-dialog__btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.suzo-toast-dialog__btn--cancel {
    background: #f3f4f6;
    color: #374151;
}

.suzo-toast-dialog__btn--cancel:hover {
    background: #e5e7eb;
}

.suzo-toast-dialog__btn--confirm {
    background: #111827;
    color: #fff;
}

.suzo-toast-dialog__btn--confirm:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
    .suzo-toast--top-right {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .suzo-toast {
        min-width: 0;
        max-width: 100%;
    }

    .suzo-toast-dialog {
        padding: 24px 20px 20px;
        border-radius: 16px;
    }
}
