/* Index Page Specific Styles - Separated from index.html */

/* Cache Status Tooltip */
.cache-status-tooltip {
    --bs-tooltip-max-width: 300px;
}

.cache-status-tooltip .tooltip-inner {
    text-align: left;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #007bff;
}

.fixed-header .navbar {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
}

.fixed-header .navbar-brand {
    font-weight: 500;
    font-size: 1.25rem;
}

.fixed-header .navbar-brand i {
    margin-right: 0.5rem;
}

/* Header Form Container */
.header-form-container {
    background: rgba(0, 123, 255, 0.95);
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-form {
    margin: 0;
}

.header-form .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.header-form .form-control,
.header-form .form-select {
    font-size: 0.875rem;
    height: calc(1.5em + 0.5rem + 2px); /* Ensures consistent height for sm controls */
}

.header-form .hotel-select-wrapper {
    display: flex;
    gap: 0.25rem;
}

.header-form .hotel-select-wrapper select {
    flex: 1;
}

/* Guest counter in header */
.header-form .input-group {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: 0.25rem;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.header-form .input-group .icon-con {
    display: flex;
    flex-direction: row;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0 0.25rem 0.25rem 0;
    border-left: none;
    flex: 0 0 auto;
    position: relative;
    align-items: stretch;
    height: 31px;
}

.header-form .input-group .icon-con .minus,
.header-form .input-group .icon-con .plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 100%;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.header-form .quantity {
    background: white;
    border: 1px solid #ced4da;
    border-left: 0;
    border-radius: 0 0.25rem 0.25rem 0;
    min-width: 110px;
    height: 31px;
    max-width: 120px;
    flex: 0 0 auto;
}

/* Adjust body padding to account for fixed header with form */
body {
    padding-top: 180px; /* Height of navbar + form */
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    body {
        padding-top: 300px; /* More space for stacked form */
    }
    
    .fixed-header .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .fixed-header .nav-item {
        padding: 0.25rem 0;
    }
    
    .header-form-container {
        padding: 1rem;
    }
    
    .header-form .col-md-3,
    .header-form .col-md-2,
    .header-form .col-md-1 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 400px; /* Even more space for mobile */
    }
}

/* Hotel Selection */
.hotel-select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hotel-select-input {
    flex: 1;
}

#refresh-hotels-btn {
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

#refresh-hotels-btn:hover {
    background: #45a049;
}

#refresh-hotels-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Helper text */
.help-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.help-text.success {
    color: #4CAF50;
}

.help-text.warning {
    color: #FF9800;
}

.help-text.error {
    color: #f44336;
}

/* Holiday Package Notice */
.holiday-package-notice {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.holiday-package-notice.visible {
    display: block;
}

.holiday-package-title {
    color: #856404;
}

.holiday-package-text {
    margin: 5px 0 0 0;
    color: #856404;
    font-size: 14px;
}

/* Results Container */
.results-container {
    display: none;
    margin-top: 30px;
}

.results-container.visible {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.results-header h3 {
    color: #333;
    margin: 0;
}

.results-counter {
    color: #666;
    font-size: 14px;
    display: none;
}

.results-counter.visible {
    display: block;
}

/* Hotels Cards Container */
.hotels-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hotel Card */
.hotel-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hotel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.hotel-icon {
    font-size: 24px;
}

.hotel-name {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.vacancy-count {
    margin-left: auto;
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Vacancies List */
.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vacancy-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #555;
}

.vacancy-number {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

/* FlexReserva Link */
.flex-reserva-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s;
}

.flex-reserva-link:hover {
    background: #1976D2;
}

/* Holiday Package Banner */
.holiday-package-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.package-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.package-icon {
    font-size: 36px;
}

.package-info {
    flex: 1;
}

.package-title {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
}

.package-description {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-in;
}

.empty-state-illustration {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-state-illustration svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state-title {
    margin: 0 0 12px 0;
    color: #212529;
    font-size: 24px;
    font-weight: 600;
}

.empty-state-message {
    margin: 0 0 32px 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.empty-state-actions .btn {
    min-width: 160px;
    padding: 12px 24px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.empty-state-actions .btn i {
    font-size: 18px;
}

.empty-state-suggestions {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.empty-state-suggestions-title {
    margin: 0 0 16px 0;
    font-weight: 600;
    color: #495057;
    font-size: 16px;
    text-align: center;
}

.empty-state-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.suggestion-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.suggestion-item i {
    font-size: 20px;
    color: #0d6efd;
    flex-shrink: 0;
    margin-top: 2px;
}

.suggestion-item span {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .empty-state {
        padding: 32px 20px;
    }
    
    .empty-state-illustration svg {
        width: 100px;
        height: 100px;
    }
    
    .empty-state-title {
        font-size: 20px;
    }
    
    .empty-state-actions {
        flex-direction: column;
    }
    
    .empty-state-actions .btn {
        width: 100%;
    }
    
    .empty-state-suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Error State */
.error-state {
    background: white;
    border: 2px solid #f44336;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #666;
}

.error-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state-title {
    margin: 0 0 10px 0;
    color: #f44336;
    font-size: 20px;
}

.error-state-message {
    margin: 0;
    color: #666;
}

.error-state-details {
    margin-top: 10px;
    color: #6b6b6b;
    font-size: 14px;
}

/* Action Buttons */
.results-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.results-action-btn {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#reset-btn {
    background: #2196F3;
    margin-top: 10px;
    width: 100%;
}

#reset-btn:hover {
    background: #0b7dda;
}

/* Responsive styling for start new search button */
@media (max-width: 767px) {
    #reset-btn {
        font-size: 14px;
    }
}

#copy-results-btn {
    background: #4CAF50;
}

#copy-results-btn:hover {
    background: #45a049;
}

#clear-results-btn {
    background: #f44336;
}

#clear-results-btn:hover {
    background: #da190b;
}

/* Booking Rules Toggle (FR-014) */
.header-form .form-check.form-switch {
    padding-left: 2.5em;
    min-height: 1.5rem;
}

.header-form .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.25em;
    margin-top: 0.125em;
}

.header-form .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.header-form .form-check-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.header-form .form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Version Footer */
.version-footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 12px;
}
