/* Wizard Styles */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.step-number.active {
    background-color: #3b82f6;
    color: white;
}

.step-number.completed {
    background-color: #10b981;
    color: white;
}

.step-label {
    font-size: 0.625rem;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.step-indicator[data-step].active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #e5e7eb;
    margin: 0 0.5rem;
    margin-top: -1.25rem;
    position: relative;
    top: 1rem;
}

.step-line.completed {
    background-color: #10b981;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Enhanced responsive design */
@media (max-width: 640px) {
    .wizard-steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }
    
    .wizard-steps .flex {
        min-width: max-content;
        justify-content: flex-start;
    }
    
    .step-indicator {
        min-width: 50px;
        flex-shrink: 0;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.5rem;
        display: none;
    }
    
    .step-line {
        margin: 0 0.25rem;
        min-width: 20px;
        flex-shrink: 0;
    }
    
    /* Keep step labels hidden on very small screens */
    .step-label {
        display: none;
    }
    
    /* Adjust spacing in progress indicator */
    .flex.items-center.justify-between.mb-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Better touch targets */
    button, .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Improve modal spacing */
    .modal-container {
        margin: 0.5rem;
        max-height: 90vh;
    }
    
    /* Better form layout */
    .grid.grid-cols-1.sm\:grid-cols-2 {
        gap: 0.75rem;
    }
    
    /* Improve chart containers */
    .chart-container {
        height: 150px !important;
    }
    
    /* Better footer spacing */
    footer {
        padding: 0.5rem 0;
    }
    
    /* Improve header spacing */
    header {
        margin-bottom: 1rem;
    }
    
    /* Better section spacing */
    main > section {
        margin-bottom: 1rem;
    }
}

/* Enhanced small screen styles */
@media (max-width: 480px) {
    /* Better modal for very small screens */
    .modal-container {
        width: 100vw;
        max-width: none;
        margin: 0;
        border-radius: 0;
        max-height: 95vh;
    }
    
    /* Better form spacing */
    .form-step {
        padding: 0.5rem;
    }
    
    /* Better button layout */
    .sticky.bottom-0 {
        padding: 0.5rem;
    }
    
    /* Better chart sizing */
    .chart-container {
        height: 120px !important;
    }
    
    /* Better header for very small screens */
    header {
        padding: 1rem 0.75rem !important;
    }
    
    /* Better section padding */
    section {
        padding: 0.75rem !important;
    }
    
    /* Ensure wizard steps remain horizontal */
    .wizard-steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .wizard-steps .flex {
        min-width: max-content;
    }
}

/* Enhanced mobile modal adjustments */
@media (max-width: 1024px) {
    .fixed.inset-0 {
        padding: 0.25rem;
    }
    
    .bg-white.rounded-lg {
        margin: 0;
        max-height: 95vh;
        border-radius: 0.5rem;
    }
    
    .p-6 {
        padding: 0.75rem;
    }
    
    .sticky.top-0.bg-white.border-b {
        padding: 0.75rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
    }
    
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Better modal responsiveness */
    .modal-container {
        width: 98vw;
        max-height: 85vh;
    }
}

/* Enhanced tablet and mobile styles */
@media (max-width: 768px) {
    .bg-white.rounded-lg {
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
        max-width: none;
    }
    
    .max-w-3xl {
        max-width: 100% !important;
    }
    
    .modal-container {
        width: 95vw;
        max-height: 90vh;
    }
    
    /* Better scrollbar for mobile */
    .flex-grow.overflow-y-auto::-webkit-scrollbar {
        width: 4px;
    }
    
    .flex-grow.overflow-y-auto::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .flex-grow.overflow-y-auto::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .flex-grow.overflow-y-auto::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
    
    /* Better spacing */
    .mb-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Better input sizing for touch */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* Better button sizing */
    .px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .py-2 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .py-3 {
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
    }
    
    /* Better navigation layout */
    .flex.justify-between {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ml-auto {
        margin-left: 0;
    }
    
    /* Better main container */
    .max-w-7xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Better datacenter cards */
    .datacenter-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .datacenter-card {
        padding: 0.75rem;
    }
    
    /* Better action buttons */
    .flex.flex-wrap.gap-4.justify-center {
        flex-direction: column;
    }
    
    .flex.flex-wrap.gap-4.justify-center button {
        width: 100%;
    }
}

/* Tablet styles */
@media (min-width: 641px) and (max-width: 1024px) {
    .max-w-4xl {
        max-width: 95%;
    }
    
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
    
    .datacenter-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Large desktop optimizations */
@media (min-width: 1025px) {
    .max-w-4xl {
        max-width: 1200px;
    }
}

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Datacenter card styles */
.datacenter-card {
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.datacenter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available {
    background-color: #10b981;
    color: white;
}

.status-limited {
    background-color: #f59e0b;
    color: white;
}

.status-full {
    background-color: #ef4444;
    color: white;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #6366f1;
    color: white;
}

/* Message styles */
.message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

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

.message-success {
    background-color: #10b981;
    color: white;
}

.message-error {
    background-color: #ef4444;
    color: white;
}

.message-info {
    background-color: #3b82f6;
    color: white;
}

/* Form validation styles */
.form-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .datacenter-card {
        padding: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Form section headers */
.form-section-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #374151;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Button hover effects */
.btn-hover-effect {
    transition: all 0.2s ease;
}

.btn-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-hover-effect:active {
    transform: translateY(0);
}

/* Card grid layout */
.datacenter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .datacenter-grid {
        grid-template-columns: 1fr;
    }
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Progress indicator */
.progress-indicator {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 40;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .datacenter-card {
        break-inside: avoid;
        border: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }
}
