/**
 * Arrivings Hotels Styles
 */

/* Search Container */
.hotels-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hotels-search-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.hotels-search-form h2 {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

/* Form Styling */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* City Autocomplete */
#city-search {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item.active {
    background: #667eea;
    color: white;
}

/* Children Ages */
#children-ages-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.child-age-input {
    display: flex;
    flex-direction: column;
}

.child-age-input label {
    font-size: 12px;
    margin-bottom: 4px;
    color: #666;
}

/* Buttons */
.form-actions {
    margin-top: 30px;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: inline-block;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 10px;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: flex;
    justify-content: center;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results */
.hotels-results-container {
    margin-top: 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.results-count {
    font-size: 16px;
    color: #666;
}

/* Hotels Grid */
.hotels-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 30px !important;
}

.hotel-card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hotel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hotel-image {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    background: #f0f0f0 !important;
    display: block !important;
}

.hotel-content {
    padding: 20px !important;
    display: block !important;
}

.hotel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.hotel-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.hotel-stars {
    color: #ffc107;
    white-space: nowrap;
    margin-left: 10px;
}

.hotel-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hotel-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hotel-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.facility-badge {
    background: #f0f4ff;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.hotel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.hotel-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 12px;
    color: #666;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.hotel-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-score {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.rating-reviews {
    font-size: 12px;
    color: #666;
}

/* Error Messages */
.search-error {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    margin-top: 20px;
}

.error-message {
    font-size: 16px;
}

/* Loading State */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-placeholder .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border-width: 4px;
    border-color: #667eea;
    border-top-color: transparent;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Modal */
.hotel-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-dialog {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-content-inner {
    overflow-y: auto;
    padding: 30px;
}

.hotel-details .hotel-gallery {
    margin-bottom: 30px;
}

.hotel-details .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.hotel-details .hotel-info {
    margin-bottom: 30px;
}

.hotel-details .hotel-info h2 {
    margin-bottom: 10px;
}

.hotel-details .stars {
    font-size: 20px;
    margin-bottom: 15px;
}

.hotel-details .address {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}

.hotel-details .description {
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.hotel-details .facilities h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.hotel-details .facility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Hotel Rooms */
.hotel-rooms {
    margin-top: 30px;
}

.hotel-rooms h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.room-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.room-info {
    flex: 1;
}

.room-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
}

.room-info p {
    color: #666;
    margin: 0 0 10px 0;
}

.room-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.room-price {
    text-align: center;
    min-width: 150px;
}

.room-price .price {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.room-price .btn-book {
    width: 100%;
    padding: 12px 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .hotels-search-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hotels-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-dialog {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-content-inner {
        padding: 20px;
    }

    .room-card {
        flex-direction: column;
        align-items: stretch;
    }

    .room-price {
        min-width: 0;
    }
}

/* Admin Styles */
.arrivings-hotels-admin {
    padding: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}
