/* Hotels.com-inspired styling - Consistent across all pages */
:root {
    --primary-color: #003580;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #e1e5e9;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--secondary-color);
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Consistent page structure */
.page-wrapper {
    min-height: 100vh;
    background: var(--secondary-color);
}

.page-content {
    padding: 2rem 0;
}

/* Professional Navigation - Consistent */
.navbar {
    background: white !important;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Page Header */
.page-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Management Cards */
.management-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.card-header-custom {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-body-custom {
    padding: 1.5rem;
}

/* City Selection */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.city-item {
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.city-item:hover {
    border-color: var(--primary-color);
    background: rgba(0, 53, 128, 0.05);
}

.city-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.city-item .city-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.city-item .city-region {
    font-size: 0.9rem;
    opacity: 0.8;
}

.city-item.selected .city-region {
    opacity: 0.9;
}

/* Region Selection */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.region-item {
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.region-item:hover {
    border-color: var(--primary-color);
    background: rgba(0, 53, 128, 0.05);
}

.region-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.region-item .region-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.region-item .region-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

.region-item.selected .region-count {
    opacity: 0.9;
}

/* Settings */
.setting-item {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.setting-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-select, .form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 53, 128, 0.25);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Action Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #002550;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Progress Indicators */
.progress-container {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, #5a67d8 100%);
    border-radius: 10px;
}

/* Tab styling */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background: rgba(0, 53, 128, 0.05);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 1.5rem;
}

/* Results Header - Consistent */
.results-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results-meta {
    background: #f0f8ff;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Hotel Cards - Consistent */
.hotel-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.hotel-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Map styling - Consistent */
#hotelsMap {
    height: 400px;
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.hotel-marker {
    background-color: var(--primary-color);
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transform: rotate(45deg);
    position: relative;
}

.hotel-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Carousel styling */
.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    margin: 0 3px !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0,0,0,0.2);
}

.carousel-indicators .active {
    background-color: #003580 !important;
}

.carousel-control-prev, .carousel-control-next {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* Progress and status styling */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background: #003580;
    border: none;
}

.btn-primary:hover {
    background: #002550;
}

.btn-outline-primary {
    border-color: #003580;
    color: #003580;
}

.btn-outline-primary:hover {
    background: #003580;
    border-color: #003580;
}

/* Loading states */
.spinner-border {
    color: #003580;
}

/* Footer */
footer {
    margin-top: 5rem;
}

/* Search Form Styling - Consistent */
.search-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin: 2rem 0;
}

.search-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 53, 128, 0.25);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background: #002550;
}

/* Autocomplete styling */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
    background-color: rgba(0, 53, 128, 0.05);
    color: var(--primary-color);
    text-decoration: none;
}

.autocomplete-item.active {
    background-color: var(--primary-color);
    color: white;
}

.autocomplete-item.active:hover,
.autocomplete-item.active:focus {
    background-color: #002550;
    color: white;
}

/* Price Slider Styling */
.price-slider-container {
    padding: 1rem;
    background: rgba(0, 53, 128, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 53, 128, 0.1);
}

.noUi-target {
    background: #e1e5e9;
    border-radius: 5px;
    border: none;
    box-shadow: none;
    height: 6px;
}

.noUi-connect {
    background: var(--primary-color);
    box-shadow: none;
}

.noUi-horizontal .noUi-handle {
    width: 17px;
    height: 17px;
    right: -8px;
    top: -5px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-handle:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Date Range Picker Styling */
.daterangepicker {
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid #e1e5e9;
}

.daterangepicker .calendar-table {
    background: white;
}

/* Guest Slider Styling */
.guest-slider-container {
    padding: 1rem;
    background: rgba(0, 53, 128, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 53, 128, 0.1);
}

/* Search Form Horizontal Styling */
.search-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e5e9;
}

.search-form-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-form-horizontal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: visible;
}

/* Ensure dropdowns show properly */
.search-field {
    position: relative;
}

.guests-selector.active .guests-dropdown,
.autocomplete-results.show {
    z-index: 1060 !important;
    position: absolute !important;
}

.search-bar {
    display: flex;
    align-items: stretch;
    min-height: 60px;
}

.search-field {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-right: 1px solid #e1e5e9;
    flex: 1;
    min-width: 0;
}

.search-field:last-child {
    border-right: none;
}

.field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 53, 128, 0.1);
    border-radius: 8px;
    margin-right: 1rem;
    color: #003580;
    font-size: 1.2rem;
}

.field-content {
    flex: 1;
    min-width: 0;
}

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.field-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    padding: 0;
}

.field-input::placeholder {
    color: #9ca3af;
}

.field-input:focus {
    outline: none;
}

.button-field {
    background: #003580;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.search-submit-btn {
    background: transparent;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.search-submit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-text {
    display: inline;
}

/* Guests Selector */
.guests-selector {
    position: relative;
    cursor: pointer;
}

.guests-input {
    cursor: pointer;
}

.guests-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 9999;
    display: none;
    margin-top: 0.25rem;
}

.guests-selector.active .guests-dropdown {
    display: block;
}

.guest-type {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.guest-type:last-child {
    border-bottom: none;
}

.guest-label {
    margin-bottom: 0.75rem;
}

.guest-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.guest-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.guest-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guest-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
}

.guest-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.guest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guest-count {
    font-weight: 600;
    color: #1f2937;
    min-width: 20px;
    text-align: center;
}

/* Autocomplete Results */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f3f4f6;
    color: #003580;
}

/* Responsive design */
@media (max-width: 768px) {
    .page-title, .results-title {
        font-size: 1.5rem;
    }

    .search-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .search-title {
        font-size: 1.5rem;
    }

    .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }

    .price-slider-container {
        padding: 0.75rem;
    }

    .guest-slider-container {
        padding: 0.75rem;
    }

    .city-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Mobile search form adjustments */
    .search-bar {
        flex-direction: column;
        min-height: auto;
    }

    .search-field {
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
        padding: 1rem;
    }

    .search-field:last-child {
        border-bottom: none;
    }

    .button-field {
        background: #003580;
        padding: 1rem;
    }

    .search-submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .btn-text {
        display: none;
    }

    .guests-dropdown {
        left: -1rem;
        right: -1rem;
        border-radius: 8px;
    }
}
