/* Modern Alert System */
.alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.alert-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.alert-box {
    background: white;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.alert-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
}

.alert-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.alert-icon.error {
    filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.3));
}

.alert-icon.success {
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.alert-icon.warning {
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.3));
}

.alert-icon.info {
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

.alert-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.alert-body {
    padding: 0 2rem 2rem 2rem;
    text-align: center;
}

.alert-message {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.alert-message strong {
    color: #1f2937;
    font-weight: 600;
}

.alert-details {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: left;
}

.alert-details-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.alert-details-item:last-child {
    border-bottom: none;
}

.alert-details-label {
    font-weight: 500;
    color: #4b5563;
}

.alert-details-value {
    font-weight: 600;
    color: #1f2937;
}

.alert-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.alert-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.alert-btn:active {
    transform: scale(0.98);
}

.alert-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.alert-btn-secondary:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.alert-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.alert-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.alert-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.alert-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.alert-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.alert-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.alert-btn-full {
    width: 100%;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #dc2626;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

.toast-message {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* Loading Spinner */
.alert-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .alert-box {
        max-width: 95%;
        margin: 1rem;
    }

    .alert-header {
        padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    }

    .alert-body {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .alert-icon {
        font-size: 3rem;
    }

    .alert-title {
        font-size: 1.25rem;
    }

    .alert-actions {
        flex-direction: column;
    }

    .alert-btn {
        width: 100%;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}
