/* ── Toast Container ── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* ── Base Toast ── */
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 24rem;
    padding: 1rem 1.25rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-navy);
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .toast {
    background: var(--bg-soft);
    border-color: var(--border);
    color: var(--text-navy);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Toast Types ── */
.toast--success {
    border-color: #10b981;
}

.toast--error {
    border-color: #f43f5e;
}

.toast--info {
    border-color: #7C6AFF;
}

/* ── Toast Icon ── */
.toast__icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.toast--success .toast__icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.toast--error .toast__icon {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.12);
}

.toast--info .toast__icon {
    color: #7C6AFF;
    background: rgba(124, 106, 255, 0.12);
}

[data-theme="light"] .toast--success .toast__icon {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .toast--error .toast__icon {
    background: rgba(244, 63, 94, 0.15);
}

[data-theme="light"] .toast--info .toast__icon {
    background: rgba(124, 106, 255, 0.15);
}

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

.toast__title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    line-height: 1.4;
}

.toast__message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Toast Close Button ── */
.toast__close {
    background: none;
    border: none;
    color: #5E5B72;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.toast__close:hover {
    color: #ECEAF5;
}

[data-theme="light"] .toast__close:hover {
    color: #1e1b4b;
}

/* ── Progress Bar ── */
.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(128, 128, 128, 0.1);
    overflow: hidden;
    border-radius: 0 0 0.75rem 0.75rem;
}

[data-theme="dark"] .toast__progress {
    background: rgba(255, 255, 255, 0.06);
}

.toast__progress-bar {
    height: 100%;
    width: 100%;
    background: currentColor;
    transform-origin: right;
    animation-name: progress-shrink;
    animation-duration: var(--toast-duration, 3.5s);
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes progress-shrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast--success .toast__progress-bar {
    color: #10b981;
}

.toast--error .toast__progress-bar {
    color: #f43f5e;
}

.toast--info .toast__progress-bar {
    color: #7C6AFF;
}

/* ── Hover Pause ── */
.toast:hover .toast__progress-bar {
    animation-play-state: paused;
}

/* ── Entry Animation ── */
.toast--slide-left {
    animation: anim-slide-left 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes anim-slide-left {
    from {
        opacity: 0;
        transform: translateX(-100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── Exit Animation ── */
.toast--exit {
    animation-name: toast-exit;
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
    animation-fill-mode: forwards;
}

.toast--exit .toast__progress-bar {
    animation-play-state: running !important;
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

/* ── Confirm Modal Overlay ── */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.confirm-overlay.show {
    opacity: 1;
}

/* ── Confirm Box ── */
.confirm-box {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 1rem;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .confirm-box {
    background: var(--bg-soft, #1e293b);
    border-color: var(--border, #334155);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    color: var(--text-navy, #f8fafc);
}

.confirm-overlay.show .confirm-box {
    transform: scale(1) translateY(0);
}

/* ── Confirm Icon ── */
.confirm-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

/* ── Confirm Text ── */
.confirm-box p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-navy, #1e293b);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .confirm-box p {
    color: #f8fafc;
}

/* ── Confirm Actions ── */
.confirm-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.confirm-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-confirm-yes {
    background: #f43f5e;
    color: white;
}

.btn-confirm-yes:hover {
    background: #e11d48;
}

.btn-confirm-no {
    background: var(--bg-soft, #f1f5f9);
    color: var(--text-muted, #64748b);
    border: 1px solid var(--border, #e2e8f0) !important;
}

[data-theme="dark"] .btn-confirm-no {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.btn-confirm-no:hover {
    background: var(--border, #e2e8f0);
}

[data-theme="dark"] .btn-confirm-no:hover {
    background: rgba(255, 255, 255, 0.1);
}


