/**
 * GPSBooking Hotel List Widget Styles
 */

.gpsbooking-hotel-list-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Compact Header Style */
.gpsbooking-compact .hotel-list-header-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.gpsbooking-compact .hotel-count-inline {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.gpsbooking-compact .filter-search-compact {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.9);
    min-width: 60px;
}

.gpsbooking-compact .filter-search-compact::placeholder {
    color: #888;
}

.gpsbooking-compact .sort-select-compact {
    padding: 0.4rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.gpsbooking-compact .sort-select-compact option {
    background: #1e3c72;
    color: white;
}

/* Original header styles */
.hotel-list-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hotel-list-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.hotel-list-controls {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.view-mode-select,
.sort-select {
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.view-mode-select option,
.sort-select option {
    background: #1e3c72;
    color: white;
}

.view-mode-select:hover,
.sort-select:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Filters */
.hotel-list-filters {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-radius,
.filter-price {
    flex: 1;
    min-width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.filter-radius::-webkit-slider-thumb,
.filter-price::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2a5298;
    cursor: pointer;
}

.filter-radius::-moz-range-thumb,
.filter-price::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2a5298;
    cursor: pointer;
    border: none;
}

.radius-value,
.price-value {
    font-size: 0.9rem;
    color: #666;
    min-width: 80px;
}

.filter-search {
    flex: 1;
    min-width: 150px;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Loading */
.hotel-loading {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2a5298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error */
.hotel-error {
    padding: 1rem;
    background: #fee;
    color: #c00;
    border-radius: 5px;
    margin: 1rem;
    font-size: 0.9rem;
}

/* Count */
.hotel-count {
    padding: 0.8rem 1rem;
    background: #e8f4ff;
    color: #1e3c72;
    font-weight: 500;
    border-bottom: 1px solid #d0e8ff;
}

/* Empty */
.hotel-empty {
    padding: 2rem;
    text-align: center;
    color: #999;
}

/* Hotels Container */
.hotel-items {
    overflow-y: auto;
    max-height: 600px;
}

/* LIST VIEW */
.hotel-items-list .hotel-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    cursor: pointer;
}

.hotel-items-list .hotel-item:hover {
    background: #f8f9fa;
}

.hotel-items-list .hotel-item:last-child {
    border-bottom: none;
}

.hotel-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hotel-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.hotel-item-name {
    margin: 0;
    color: #1e3c72;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.hotel-item-rating {
    color: #f5a623;
    white-space: nowrap;
    font-size: 0.9rem;
}

.hotel-item-address {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.hotel-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.hotel-item-distance {
    color: #2a5298;
    font-weight: 500;
}

.hotel-item-price {
    color: #27ae60;
    font-weight: 500;
}

.hotel-item-book {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #2a5298;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    align-self: start;
}

.hotel-item-book:hover {
    background: #1e3c72;
}

/* GRID VIEW */
.hotel-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.hotel-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

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

.hotel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.hotel-card-header h4 {
    margin: 0;
    color: #1e3c72;
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
}

.hotel-card-rating {
    color: #f5a623;
    white-space: nowrap;
}

.hotel-card-city {
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.85rem;
}

.hotel-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin: 0.8rem 0;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
}

.hotel-card-book {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: #2a5298;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.hotel-card-book:hover {
    background: #1e3c72;
}

/* ACCORDION VIEW */
.hotel-items-accordion {
    padding: 0;
}

.hotel-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

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

.accordion-header {
    padding: 1rem;
    cursor: pointer;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #e8ecf0;
}

.accordion-title {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.accordion-title h4 {
    margin: 0;
    color: #1e3c72;
    font-size: 1rem;
    font-weight: 600;
}

.accordion-rating {
    color: #f5a623;
    white-space: nowrap;
}

.accordion-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #666;
    min-width: 150px;
}

.accordion-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    color: #666;
    transition: transform 0.2s;
}

.accordion-body {
    padding: 1rem;
    background: white;
}

.accordion-content p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.accordion-book {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: #2a5298;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.accordion-book:hover {
    background: #1e3c72;
}

/* Responsive */
@media (max-width: 768px) {
    .hotel-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hotel-list-controls {
        width: 100%;
        flex-direction: column;
    }

    .hotel-list-controls select {
        width: 100%;
    }

    .hotel-list-filters {
        flex-direction: column;
        gap: 0.8rem;
    }

    .filter-radius,
    .filter-price,
    .filter-search {
        width: 100%;
    }

    .radius-value,
    .price-value {
        width: 100%;
    }

    .hotel-items-grid {
        grid-template-columns: 1fr;
    }

    .accordion-summary {
        flex-direction: column;
        gap: 0.5rem;
        min-width: 0;
    }
}

/* Hotel selected state - sync with map */
.hotel-accordion-item.hotel-selected {
    border: 2px solid #2a5298 !important;
    background: linear-gradient(135deg, #e8f0fe 0%, #f8fbff 100%) !important;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3) !important;
}

.hotel-accordion-item.hotel-selected .accordion-header {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
}

.hotel-accordion-item.hotel-selected .accordion-title h4 {
    color: white;
}

.hotel-accordion-item.hotel-selected .accordion-summary span {
    color: rgba(255, 255, 255, 0.9);
}

.hotel-accordion-item.hotel-selected .accordion-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
