/**
 * Hotel Cards CSS
 * Styles for hotel search and display
 *
 * @package TravelBookingMaster
 */

/* Hotel search form */
.tbm-hotel-search-section {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tbm-hotel-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tbm-form-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.tbm-form-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 14px;
}

.tbm-form-field input,
.tbm-form-field select {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.tbm-form-field input:focus,
.tbm-form-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* City autocomplete dropdown */
.tbm-city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.tbm-city-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tbm-city-suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.tbm-city-suggestions li:last-child {
    border-bottom: none;
}

.tbm-city-suggestions li:hover {
    background: #f0f0f0;
}

.tbm-city-suggestions strong {
    display: block;
    color: #2d3748;
    font-size: 14px;
}

.tbm-city-suggestions small {
    color: #718096;
    font-size: 12px;
}

/* Hotel result cards */
.tbm-hotel-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.tbm-hotel-card.selected {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
    background: #f7faff;
}

.tbm-hotel-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    background: #e2e8f0;
}

.tbm-hotel-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tbm-hotel-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.tbm-hotel-address {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
}

/* Star rating */
.tbm-hotel-stars {
    color: #fbbf24;
    font-size: 16px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Review score */
.tbm-hotel-review {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.tbm-review-score {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.tbm-review-count {
    color: #718096;
    font-size: 14px;
}

/* Price display */
.tbm-hotel-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 15px;
}

.tbm-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.tbm-price-label {
    font-size: 14px;
    color: #718096;
}

.tbm-total-price {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 15px;
}

/* Action buttons */
.tbm-hotel-actions {
    display: flex;
    gap: 10px;
}

.tbm-select-hotel {
    padding: 10px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.tbm-select-hotel:hover {
    background: #5568d3;
}

.tbm-select-hotel:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.tbm-view-hotel {
    padding: 10px 24px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.tbm-view-hotel:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* Hotels list */
.tbm-hotels-list {
    margin-top: 20px;
}

/* Loading spinner */
.tbm-loading-hotels {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.tbm-loading-hotels::before {
    content: '⏳';
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    animation: spin 2s linear infinite;
}

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

/* Empty state */
.tbm-no-hotels {
    text-align: center;
    padding: 40px;
    color: #718096;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #cbd5e0;
}

.tbm-no-hotels::before {
    content: '🏨';
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Search button */
.tbm-hotel-search-section button[type="button"] {
    width: 100%;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.3s;
}

.tbm-hotel-search-section button[type="button"]:hover {
    background: #5568d3;
}

.tbm-hotel-search-section button[type="button"]:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.tbm-hotel-search-section button[type="button"] .icon {
    margin-right: 8px;
}

/* Results header */
.tbm-hotel-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .tbm-hotel-card {
        grid-template-columns: 1fr;
    }
    
    .tbm-hotel-search-form {
        grid-template-columns: 1fr;
    }
    
    .tbm-hotel-actions {
        flex-direction: column;
    }
    
    .tbm-select-hotel,
    .tbm-view-hotel {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tbm-hotel-search-section {
        padding: 20px 15px;
    }
    
    .tbm-hotel-card {
        padding: 15px;
    }
    
    .tbm-hotel-name {
        font-size: 18px;
    }
    
    .tbm-price-amount {
        font-size: 24px;
    }
}
