/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    min-width: 320px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: #48bb78;
}

.toast.error::before {
    background: #f56565;
}

.toast.warning::before {
    background: #ed8936;
}

.toast.info::before {
    background: #4299e1;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-icon.success svg {
    color: #48bb78;
}

.toast-icon.error svg {
    color: #f56565;
}

.toast-icon.warning svg {
    color: #ed8936;
}

.toast-icon.info svg {
    color: #4299e1;
}

.toast-text {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.toast-message {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #4a5568;
}

.toast-close svg {
    width: 100%;
    height: 100%;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(72, 187, 120, 0.3);
    width: 100%;
    transform-origin: left;
    animation: toastProgress 5s linear forwards;
}

.toast.error .toast-progress {
    background: rgba(245, 101, 101, 0.3);
}

.toast.warning .toast-progress {
    background: rgba(237, 137, 54, 0.3);
}

.toast.info .toast-progress {
    background: rgba(66, 153, 225, 0.3);
}

@keyframes toastProgress {
    to {
        transform: scaleX(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #2d3748;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Validation Styles */
.input-error {
    border-color: #f56565 !important;
    background-color: #fed7d7 !important;
}

.input-success {
    border-color: #48bb78 !important;
    background-color: #f0fff4 !important;
}

.error-message {
    color: #f56565;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .toast.hide {
        transform: translateY(-100%);
    }
    
    .loading-spinner {
        margin: 0 1rem;
        max-width: calc(100vw - 2rem);
    }
}