/**
 * Uplisting Booking Plugin Styles
 */

/* Reset and Base Styles */
.uplisting-booking-widget,
.uplisting-results-page,
.uplisting-room-detail {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Booking Widget Styles */
.uplisting-booking-widget {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.uplisting-layout-horizontal .uplisting-form-row {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.uplisting-layout-vertical .uplisting-form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.uplisting-form-group {
    flex: 1;
    min-width: 150px;
}

.uplisting-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a5568;
    font-size: 14px;
}

.uplisting-date-group {
    position: relative;
}

.uplisting-datepicker {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

.uplisting-datepicker:focus {
    outline: none;
    border-color: #667c6b;
    box-shadow: 0 0 0 3px rgba(102, 124, 107, 0.1);
}

.uplisting-calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 18px;
}

/* Guests Selector */
.uplisting-guests-selector {
    position: relative;
}

.uplisting-guests-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.uplisting-guests-trigger:hover,
.uplisting-guests-trigger:focus {
    border-color: #667c6b;
    outline: none;
}

.uplisting-guests-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.uplisting-guests-dropdown.active {
    display: block;
}

.uplisting-guest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.uplisting-guest-item:last-child {
    border-bottom: none;
}

.uplisting-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uplisting-counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.uplisting-counter-btn:hover {
    border-color: #667c6b;
    background: #667c6b;
    color: white;
}

.uplisting-counter input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 600;
    background: transparent;
}

/* Search Button */
.uplisting-search-btn {
    background: #667c6b;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.uplisting-search-btn:hover {
    background: #5a6b5f;
}

/* Results Page Styles */
.uplisting-results-page {
    padding: 40px 0;
}

.uplisting-results-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-summary {
    background: #f8f9fa;
    padding: 16px 24px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 16px;
    color: #4a5568;
}

.uplisting-results-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.uplisting-sidebar {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.uplisting-main-content {
    flex: 1;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.listing-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.listing-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: 600;
}

.price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.95);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.listing-content {
    padding: 20px;
}

.listing-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.listing-content h3 a {
    color: #2d3748;
    text-decoration: none;
}

.listing-content h3 a:hover {
    color: #667c6b;
}

.listing-meta {
    color: #718096;
    font-size: 14px;
    margin-bottom: 12px;
}

.listing-description {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.listing-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.total-price {
    font-weight: 600;
    color: #2d3748;
}

.view-details-btn {
    background: #667c6b;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.view-details-btn:hover {
    background: #5a6b5f;
    color: white;
}

/* Room Detail Styles */
.uplisting-room-detail {
    padding: 40px 0;
}

.uplisting-room-detail .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.room-header {
    margin-bottom: 40px;
}

.room-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2d3748;
}

.room-meta {
    color: #718096;
    font-size: 16px;
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.room-gallery img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.room-description {
    margin: 24px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
}

/* Booking Sidebar */
.booking-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.booking-form-container {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.price-header {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
}

.booking-form .form-group {
    margin-bottom: 20px;
}

.booking-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a5568;
    font-size: 14px;
}

.booking-form input,
.booking-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.booking-form input:focus,
.booking-form select:focus {
    outline: none;
    border-color: #667c6b;
    box-shadow: 0 0 0 3px rgba(102, 124, 107, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Extra Services */
.extra-services {
    margin: 24px 0;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.extra-services h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.service-item:last-child {
    border-bottom: none;
}

.service-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.service-item input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.service-price {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Total Cost */
.total-cost {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

/* Book Now Button */
.book-now-btn {
    width: 100%;
    background: #2d3748;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.book-now-btn:hover {
    background: #1a202c;
}

.book-now-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Unavailable State */
.unavailable-notice {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.unavailable-notice h3 {
    color: #e53e3e;
    margin-bottom: 12px;
}

.search-again-btn {
    display: inline-block;
    background: #667c6b;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 16px;
    transition: background-color 0.2s ease;
}

.search-again-btn:hover {
    background: #5a6b5f;
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-results h2 {
    color: #4a5568;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .uplisting-layout-horizontal .uplisting-form-row {
        flex-direction: column;
    }
    
    .uplisting-results-content,
    .room-content {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .uplisting-sidebar {
        order: -1;
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .uplisting-booking-widget,
    .booking-form-container {
        padding: 16px;
    }
    
    .room-header h1 {
        font-size: 24px;
    }
    
    .price-header {
        font-size: 20px;
    }
} 