/* ============================================
   MODERN TOAST NOTIFICATIONS
   ============================================ */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
    color: #1a1a1a;
}

.toast-message {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.4;
}

/* Success State */
.toast-success {
    background: #ffffff;
    border: none;
}
.toast-success .toast-title,
.toast-success .toast-message,
.toast-success .toast-close {
    color: #2c2c2c;
}
.toast-success .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #2c2c2c;
}
.toast-success .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Error State */
.toast-error {
    border-left: 5px solid #ef4444;
}
.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Warning State */
.toast-warning {
    border-left: 5px solid #f59e0b;
}
.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Animation for Slide Out */
.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 12px;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    background: #1976d2;
    border-bottom-left-radius: 12px;
    transform-origin: left;
    transform: scaleX(1);
}

.toast.show .toast-progress-bar {
    animation: progress 4s linear forwards;
}

@keyframes progress {
    to {
        transform: scaleX(0);
    }
}

/* Close Button */
.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   CUSTOM CONFIRMATION MODAL
   ============================================ */

#confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#confirm-modal.active {
    display: flex;
}

.confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.confirm-content {
    position: relative;
    background: white;
    padding: 32px;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: #fff5f5;
    color: #ef4444;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.confirm-content p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 28px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-confirm-cancel {
    background: #f1f5f9;
    color: #475569;
}

.btn-confirm-cancel:hover {
    background: #e2e8f0;
}

.btn-confirm-yes {
    background: #ef4444;
    color: white;
}

.btn-confirm-yes:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

@media (max-width: 480px) {
    #toast-container {
        top: 20px;
        right: 20px;
        left: 20px;
    }
    .toast {
        min-width: auto;
        width: 100%;
    }
}
