/* ======================================================
   TOAST NOTIFICATIONS
====================================================== */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #333;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    font-size: 14px;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

.toast.info {
    background: #3b82f6;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* ======================================================
   BUTTON LOADING STATE
====================================================== */

.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn.is-loading span {
    visibility: hidden;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ======================================================
   MOBILE RESPONSIVE
====================================================== */

@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .toast {
        padding: 12px 14px;
    }
}

/* ======================================================
   CONFIRM MODAL
====================================================== */

.toast-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 1rem;
}

.toast-confirm-overlay.is-open {
    opacity: 1;
}

.toast-confirm-modal {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.toast-confirm-overlay.is-open .toast-confirm-modal {
    transform: scale(1);
}

.toast-confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.toast-confirm-icon.warning {
    color: #f59e0b;
}

.toast-confirm-icon.danger {
    color: #ef4444;
}

.toast-confirm-message {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.toast-confirm-actions {
    display: flex;
    gap: 0.75rem;
}

.toast-confirm-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.toast-confirm-cancel {
    background: #e5e7eb;
    color: #374151;
}

.toast-confirm-cancel:hover {
    background: #d1d5db;
}

.toast-confirm-ok {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-confirm-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
