/* Vio.com Inspired Design - Light & Compact */
:root {
    --vio-primary: #6366f1;
    --vio-primary-dark: #4f46e5;
    --vio-secondary: #8b5cf6;
    --vio-accent: #06b6d4;
    --vio-success: #10b981;
    --vio-warning: #f59e0b;
    --vio-error: #ef4444;
    --vio-bg: #ffffff;
    --vio-bg-light: #f8fafc;
    --vio-surface: #f1f5f9;
    --vio-text: #1e293b;
    --vio-text-muted: #64748b;
    --vio-border: #e2e8f0;
}

/* Page Background */
body {
    background: linear-gradient(135deg, var(--vio-bg-light) 0%, var(--vio-bg) 100%);
    color: var(--vio-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 15px;
}

/* Header Styling */
h1 {
    color: var(--vio-text);
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
    background: var(--vio-primary-dark);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container Styling */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--vio-bg);
    border-radius: 12px;
    border: 1px solid var(--vio-border);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Button Styles - Compact */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vio-primary) 0%, var(--vio-secondary) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--vio-primary);
    border: 1px solid var(--vio-primary);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--vio-primary);
    color: white;
    transform: translateY(-1px);
}



/* Search Controls */
.search-controls {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px;
    /* padding: 12px;
    background: var(--vio-surface);
    border-radius: 8px;
    border: 1px solid var(--vio-border); */
}

.btn-add-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-add-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-add-search:active {
    transform: translateY(0);
}

.btn-collapse {
    background: rgba(99, 102, 241, 0.1);
    color: var(--vio-primary);
    border: 1px solid var(--vio-primary);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-collapse:hover {
    transform: translateY(-2px);
}

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

/* Search Boxes */
.search-box {
    background: var(--vio-bg);
    border: 1px solid var(--vio-border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-box:hover {
    border-color: var(--vio-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.search-box.main-search-box {
    border-color: var(--vio-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.search-box-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 10px 15px;
    border-bottom: 1px solid var(--vio-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box-title {
    font-weight: 600;
    color: var(--vio-text);
    font-size: 14px;
}

.remove-search-btn {
    background: var(--vio-error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-search-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Form Styling */
.search-form-inner {
    padding: 12px;
    background: var(--vio-bg);
    transition: all 0.2s ease;
}

.search-form-inner.collapsed {
    display: none;
}

.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    color: var(--vio-text);
    font-size: 11px;
    white-space: nowrap;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--vio-border);
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    background: var(--vio-bg);
    color: var(--vio-text);
    box-sizing: border-box;
    height: 32px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--vio-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--vio-text-muted);
}

.hotel-ids-input {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Make specific form groups smaller for better fit on desktop */
.form-group:nth-child(1) { /* Hotel ID */
    flex: 0 0 110px;
}

.form-group:nth-child(2) { /* Check-in Date */
    flex: 0 0 130px;
}

.form-group:nth-child(3) { /* Nights */
    flex: 0 0 90px;
}

.form-group:nth-child(4) { /* Device */
    flex: 0 0 110px;
}

.form-group:nth-child(5) { /* Room Configuration */
    flex: 0 0 130px;
}

/* Update Chart Button */
#updateChartBtn {
    margin: 15px 0;
    display: block;
    width: auto;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    background: var(--vio-primary-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

#updateChartBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
    min-height: 400px;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 15px;
    padding: 12px;
    background: var(--vio-surface);
    border-radius: 8px;
    border: 1px solid var(--vio-border);
}

.scale-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--vio-primary);
    border-radius: 6px;
}

.scale-label {
    font-weight: 600;
    color: var(--vio-primary);
    font-size: 12px;
}

.scale-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--vio-primary);
    cursor: pointer;
}

.scale-description {
    font-size: 11px;
    color: var(--vio-text-muted);
    font-style: italic;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--vio-accent);
    font-weight: 600;
    font-size: 14px;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--vio-error);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--vio-error);
    margin: 12px 0;
}

.no-data-message {
    text-align: center;
    padding: 30px 20px;
    color: var(--vio-text-muted);
}

.no-data-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

.no-data-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--vio-text);
}

.no-data-subtext {
    font-size: 0.875rem;
    color: var(--vio-text-muted);
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
        max-width: none;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .search-controls {
        gap: 5px;
        align-items: stretch;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    
    .form-group {
        flex: 1 1 auto !important;
        min-width: 120px;
        max-width: calc(50% - 4px);
    }
    
    /* Allow Hotel ID and Check-in to stay on same line if they fit */
    .form-group:nth-child(1),
    .form-group:nth-child(2) {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 140px;
    }
    
    /* Allow Nights, Device, and Room Configuration to stay on same line if they fit */
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .form-group:nth-child(5) {
        flex: 1 1 calc(33.33% - 4px) !important;
        min-width: 100px;
    }
    
    .search-box-header {
        padding: 12px 15px;
    }
    
    .search-form-inner {
        padding: 12px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 10px;
        font-size: 13px;
        height: 36px;
    }
    
    .chart-container {
        padding: 5px;
        margin-top: 10px;
        aspect-ratio: 4 / 3 !important;
        min-height: 300px;
    }
    
    .chart-controls {
        flex-direction: column !important;
        gap: 10px;
        align-items: stretch;
    }
    
    .scale-toggle {
        justify-content: center;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
        margin: 2px;
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .search-controls {
        gap: 4px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0px;
        margin-bottom: 5px;
    }
    
    .form-group {
        flex: 1 1 auto !important;
        min-width: 0;
        max-width: 100%;
    }
    
    /* On very small screens, allow 2 columns when possible */
    .form-group:nth-child(1),
    .form-group:nth-child(2) {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 120px;
    }
    
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .form-group:nth-child(5) {
        flex: 1 1 calc(33.33% - 4px) !important;
        min-width: 80px;
    }
    
    .search-box {
        margin-bottom: 10px;
    }
    
    .search-box-header {
        padding: 10px 12px;
    }
    
    .search-form-inner {
        padding: 10px;
    }
    
    .form-row {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .chart-container {
        padding: 2px;
        margin-top: 2px;
        aspect-ratio: 1 / 1 !important;
        min-height: 250px;
    }
    
    .scale-toggle {
        padding: 8px 12px;
        flex-direction: column !important;
        gap: 6px;
        text-align: center;
    }
    
    .scale-label {
        font-size: 13px;
    }
    
    .scale-description {
        font-size: 11px;
    }
}