/* Modern styling for the cloud management platform */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2563EB;
    border-radius: 3px;
    opacity: 0.7;
}

::-webkit-scrollbar-thumb:hover {
    background: #1D4ED8;
    opacity: 1;
}

.dark ::-webkit-scrollbar-thumb {
    background: #64748B;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Enhanced focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-color: #2563EB;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Button interactions */
button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading animations */
.spinner {
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top: 3px solid #2563EB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status indicators */
.status-dot {
    position: relative;
    display: inline-block;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Region group animations */
.region-group {
    transition: all 0.3s ease;
}

.group-content {
    transition: all 0.3s ease;
    max-height: 500px;
    overflow: hidden;
}

.group-content[style*="display: none"] {
    max-height: 0;
    padding: 0;
    border: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
    
    .text-responsive {
        font-size: 0.875rem;
    }
    
    .p-responsive {
        padding: 1rem;
    }
    
    .gap-responsive {
        gap: 0.75rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card, .modal {
        border: 2px solid;
    }
    
    button {
        border: 2px solid transparent;
    }
    
    button:focus {
        border-color: currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Interactive elements */
.interactive:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .interactive:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Form enhancements */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.75);
    color: #2563EB;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

/* Progress indicators */
.progress-bar {
    background: linear-gradient(90deg, #2563EB, #059669);
    border-radius: 9999px;
    height: 4px;
    transition: width 0.3s ease;
}

/* Notification styles */
.notification {
    backdrop-filter: blur(12px);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Table responsive design */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
}

/* Shadow utilities */
.shadow-elevated {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.shadow-floating {
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
}

/* Dark mode specific enhancements */
.dark .shadow-elevated {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.24),
        0 1px 2px rgba(0, 0, 0, 0.48);
}

.dark .shadow-floating {
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.5),
        0 10px 10px rgba(0, 0, 0, 0.44);
}