/* Sri Lanka Hotels - Frontend Styles */

/* Hotel Comparison Widget */
.slh-hotel-comparison {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.slh-hotel-comparison h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.slh-search-form {
    margin-bottom: 25px;
}

.slh-hotel-comparison #slh-price-search-form,
.slh-hotel-comparison .slh-search-form,
.slh-modal #slh-quick-search-form {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

/* 4 equal fields = same total width as the button below */
.slh-hotel-comparison .slh-form-fields,
.slh-modal .slh-form-fields {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    align-items: end;
    box-sizing: border-box;
}

.slh-hotel-comparison .slh-form-actions,
.slh-modal .slh-form-actions {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Legacy .slh-form-row layouts (modals / other forms) */
.slh-hotel-comparison .slh-form-row,
.slh-search-form .slh-form-row,
.slh-modal .slh-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: end;
    width: 100%;
}

.slh-hotel-comparison .slh-form-group,
.slh-search-form .slh-form-group,
.slh-modal .slh-form-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.slh-hotel-comparison .slh-form-group--action,
.slh-search-form .slh-form-group--action,
.slh-modal .slh-form-group--action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 4px;
}

.slh-hotel-comparison .slh-form-group label,
.slh-search-form .slh-form-group label,
.slh-modal .slh-form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    line-height: 1.2;
}

/* Equal-height controls — beat theme select/input styles */
.slh-hotel-comparison .slh-form-group input[type="date"],
.slh-hotel-comparison .slh-form-group input[type="text"],
.slh-hotel-comparison .slh-form-group select,
.slh-search-form .slh-form-group input[type="date"],
.slh-search-form .slh-form-group input[type="text"],
.slh-search-form .slh-form-group select,
.slh-modal .slh-form-group input[type="date"],
.slh-modal .slh-form-group input[type="text"],
.slh-modal .slh-form-group select {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 6px !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 46px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slh-hotel-comparison .slh-form-group select,
.slh-search-form .slh-form-group select,
.slh-modal .slh-form-group select {
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 8px !important;
    cursor: pointer;
}

.slh-hotel-comparison .slh-form-group input[type="date"],
.slh-search-form .slh-form-group input[type="date"],
.slh-modal .slh-form-group input[type="date"] {
    position: relative;
}

.slh-hotel-comparison .slh-form-group input[type="date"]::-webkit-calendar-picker-indicator,
.slh-search-form .slh-form-group input[type="date"]::-webkit-calendar-picker-indicator,
.slh-modal .slh-form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.65;
}

.slh-hotel-comparison .slh-form-group input:focus,
.slh-hotel-comparison .slh-form-group select:focus,
.slh-search-form .slh-form-group input:focus,
.slh-search-form .slh-form-group select:focus,
.slh-modal .slh-form-group input:focus,
.slh-modal .slh-form-group select:focus {
    outline: none;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.12);
}

.slh-hotel-comparison .slh-search-btn,
.slh-search-form .slh-search-btn,
.slh-modal .slh-search-btn {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border: none !important;
    border-radius: 6px !important;
    background: #0073aa !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.slh-hotel-comparison .slh-search-btn:hover,
.slh-search-form .slh-search-btn:hover,
.slh-modal .slh-search-btn:hover {
    background: #005a87 !important;
    color: #fff !important;
}

.slh-hotel-comparison .slh-search-btn:disabled,
.slh-search-form .slh-search-btn:disabled,
.slh-modal .slh-search-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Price Results */
.slh-price-results {
    margin-top: 25px;
}

.slh-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.slh-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.slh-prices-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slh-price-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slh-price-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slh-platform-logo img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

.slh-price-details {
    flex: 1;
}

.slh-price-amount {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.slh-currency {
    font-size: 14px;
    color: #666;
    margin-right: 5px;
}

.slh-price {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
}

.slh-room-type {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.slh-platform-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slh-star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.slh-star {
    font-size: 16px;
    color: #ffc107;
}

.slh-star-empty {
    color: #ddd;
}

.slh-rating-text {
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

.slh-reviews-count {
    font-size: 12px;
    color: #666;
}

.slh-price-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slh-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.slh-btn-primary {
    background: #0073aa;
    color: white;
}

.slh-btn-primary:hover {
    background: #005a87;
    color: white;
}

.slh-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.slh-btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* Hotel Listing */
.slh-hotel-listing {
    margin: 20px 0;
}

.slh-hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.slh-hotel-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slh-hotel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.slh-hotel-image {
    position: relative;
    overflow: hidden;
}

.slh-hotel-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slh-hotel-card:hover .slh-hotel-image img {
    transform: scale(1.05);
}

.slh-hotel-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slh-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.slh-badge-type {
    background: #0073aa;
}

.slh-hotel-content {
    padding: 20px;
}

.slh-hotel-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.slh-hotel-title a {
    color: #333;
    text-decoration: none;
}

.slh-hotel-title a:hover {
    color: #0073aa;
}

.slh-hotel-location {
    margin-bottom: 10px;
}

.slh-location {
    color: #666;
    font-size: 14px;
}

.slh-hotel-rating {
    margin-bottom: 15px;
}

.slh-hotel-amenities {
    margin-bottom: 15px;
}

.slh-amenity {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.slh-hotel-actions {
    display: flex;
    gap: 10px;
}

.slh-hotel-actions .slh-btn {
    flex: 1;
    text-align: center;
}

/* Search Widget */
.slh-hotel-search-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.slh-search-form .slh-form-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
}

.slh-advanced-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.slh-amenities-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.slh-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.slh-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.slh-toggle-advanced {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.slh-toggle-advanced:hover {
    color: #005a87;
}

/* Featured Hotels */
.slh-featured-hotels {
    margin: 30px 0;
}

.slh-section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.slh-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.slh-featured-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.slh-featured-card:hover {
    transform: translateY(-3px);
}

.slh-featured-image {
    position: relative;
}

.slh-featured-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.slh-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.slh-featured-content {
    padding: 20px;
}

.slh-featured-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.slh-featured-title a {
    color: #333;
    text-decoration: none;
}

.slh-featured-title a:hover {
    color: #0073aa;
}

.slh-featured-location {
    margin-bottom: 10px;
}

.slh-featured-rating {
    margin-bottom: 10px;
}

.slh-featured-price {
    margin-bottom: 15px;
}

.slh-price-from {
    font-size: 12px;
    color: #666;
}

.slh-price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}

.slh-price-period {
    font-size: 12px;
    color: #666;
}

/* Hotel Map */
.slh-hotel-map {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Filters */
.slh-filters {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.slh-filters-form .slh-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.slh-filter-group {
    display: flex;
    flex-direction: column;
}

.slh-filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.slh-filter-group select,
.slh-filter-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.slh-filter-btn,
.slh-clear-filters {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slh-filter-btn {
    background: #0073aa;
    color: white;
}

.slh-filter-btn:hover {
    background: #005a87;
}

.slh-clear-filters {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.slh-clear-filters:hover {
    background: #e0e0e0;
}

/* Pagination */
.slh-pagination {
    text-align: center;
    margin: 30px 0;
}

.slh-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.slh-pagination .page-numbers:hover,
.slh-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
}

/* No Results */
.slh-no-hotels,
.slh-no-prices {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .slh-hotel-comparison .slh-form-fields,
    .slh-modal .slh-form-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .slh-form-row,
    .slh-hotel-comparison .slh-form-row,
    .slh-search-form .slh-form-row,
    .slh-modal .slh-form-row {
        grid-template-columns: 1fr 1fr;
    }

    .slh-hotel-comparison .slh-form-group--action,
    .slh-search-form .slh-form-group--action,
    .slh-modal .slh-form-group--action {
        grid-column: 1 / -1;
    }
    
    .slh-price-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .slh-hotel-grid {
        grid-template-columns: 1fr;
    }
    
    .slh-featured-grid {
        grid-template-columns: 1fr;
    }
    
    .slh-filters-form .slh-filter-row {
        grid-template-columns: 1fr;
    }
    
    .slh-hotel-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .slh-hotel-comparison .slh-form-fields,
    .slh-modal .slh-form-fields,
    .slh-hotel-comparison .slh-form-row,
    .slh-search-form .slh-form-row,
    .slh-modal .slh-form-row {
        grid-template-columns: 1fr !important;
    }

    .slh-hotel-comparison,
    .slh-hotel-search-widget {
        padding: 15px;
    }
    
    .slh-hotel-content {
        padding: 15px;
    }
    
    .slh-featured-content {
        padding: 15px;
    }
}

/* ── Google-style "All options" price list (Module 3) ── */
.slh-all-options {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.slh-all-options-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding: 0;
    color: #202124;
}

.slh-options-list {
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
}

.slh-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaed;
    gap: 12px;
    transition: background 0.15s;
}

.slh-option-row:last-child {
    border-bottom: none;
}

.slh-option-row:hover {
    background: #f8f9fa;
}

.slh-option-provider {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 140px;
}

.slh-provider-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.slh-provider-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    white-space: nowrap;
}

.slh-option-badge {
    font-size: 11px;
    font-weight: 500;
    color: #137333;
    background: #e6f4ea;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.slh-option-note {
    font-size: 13px;
    color: #5f6368;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slh-option-price-action {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.slh-option-price {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    white-space: nowrap;
}

a.slh-visit-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1a73e8;
    border: 1px solid #dadce0;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

a.slh-visit-btn:hover {
    background: #f1f3f4;
    border-color: #c6c9cc;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .slh-option-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .slh-option-provider {
        min-width: auto;
    }
    
    .slh-option-note {
        width: 100%;
        order: 3;
        text-align: left;
    }
    
    .slh-option-price-action {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .slh-option-row {
        padding: 10px 12px;
    }
    
    .slh-option-price {
        font-size: 14px;
    }
    
    a.slh-visit-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}