/**
 * Hotel Booking & Vacation Rental Pro - Frontend Styles
 * Built with CSS Variables for seamless Theme UI Adaptation
 */

:root {
    --hb-primary: #10b981;
    --hb-primary-hover: #059669;
    --hb-primary-light: #ecfdf5;
    --hb-secondary: #0f172a;
    --hb-text: #334155;
    --hb-text-light: #64748b;
    --hb-bg: #ffffff;
    --hb-bg-subtle: #f8fafc;
    --hb-border: #e2e8f0;
    --hb-radius: 10px;
    --hb-radius-lg: 16px;
    --hb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --hb-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --hb-font-sans: inherit;
}

/* Reset / Box sizing */
.hb-search-wrap,
.hb-results-container,
.hb-accommodations-grid,
.hb-single-acc-wrap,
.hb-calendar-container,
.hb-checkout-container,
.hb-confirmation-wrap {
    font-family: var(--hb-font-sans);
    color: var(--hb-text);
    box-sizing: border-box;
    margin: 20px 0;
}

.hb-search-wrap *,
.hb-results-container *,
.hb-accommodations-grid *,
.hb-single-acc-wrap *,
.hb-calendar-container *,
.hb-checkout-container * {
    box-sizing: border-box;
}

/* 1. SEARCH FORM */
.hb-search-wrap {
    background: var(--hb-bg);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    box-shadow: var(--hb-shadow-lg);
    padding: 24px;
}

.hb-search-form-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.hb-search-field {
    flex: 1;
    min-width: 140px;
}

.hb-search-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--hb-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hb-search-field input,
.hb-search-field select {
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    background: var(--hb-bg-subtle);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    color: var(--hb-secondary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.hb-search-field input:focus,
.hb-search-field select:focus {
    background: #ffffff;
    border-color: var(--hb-primary);
    box-shadow: 0 0 0 3px var(--hb-primary-light);
}

.hb-search-submit {
    flex: 0 0 auto;
    min-width: 150px;
}

.hb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--hb-primary);
    color: #ffffff !important;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--hb-radius);
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.hb-btn-primary:hover {
    background-color: var(--hb-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* 2. ACCOMMODATION CARDS & GRID */
.hb-accommodations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.hb-card {
    background: var(--hb-bg);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    overflow: hidden;
    box-shadow: var(--hb-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hb-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hb-shadow-lg);
}

.hb-card-media {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--hb-bg-subtle);
}

.hb-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hb-card:hover .hb-card-media img {
    transform: scale(1.05);
}

.hb-price-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
}

.hb-price-badge span {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}

.hb-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hb-card-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--hb-secondary);
}

.hb-card-title a {
    color: inherit;
    text-decoration: none;
}

.hb-card-title a:hover {
    color: var(--hb-primary);
}

.hb-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--hb-text-light);
    margin-bottom: 14px;
}

.hb-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--hb-bg-subtle);
    padding: 4px 10px;
    border-radius: 6px;
}

.hb-card-excerpt {
    font-size: 14px;
    color: var(--hb-text);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.hb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--hb-border);
    padding-top: 14px;
    margin-top: auto;
}

/* 3. AVAILABILITY CALENDAR WIDGET */
.hb-calendar-container {
    background: var(--hb-bg);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 24px;
    box-shadow: var(--hb-shadow);
}

.hb-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hb-cal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hb-secondary);
}

.hb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.hb-cal-day-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--hb-text-light);
    padding: 8px 0;
    text-transform: uppercase;
}

.hb-cal-day {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: var(--hb-bg-subtle);
    border: 1px solid var(--hb-border);
    transition: all 0.2s ease;
}

.hb-cal-day.available {
    background: var(--hb-primary-light);
    color: var(--hb-primary);
    border-color: rgba(16, 185, 129, 0.2);
}

.hb-cal-day.booked {
    background: #fef2f2;
    color: #ef4444;
    text-decoration: line-through;
    opacity: 0.6;
}

.hb-cal-day.past {
    opacity: 0.3;
}

/* 4. CHECKOUT CONTAINER */
.hb-checkout-container {
    max-width: 1000px;
    margin: 30px auto;
}

.hb-checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}

@media (max-width: 860px) {
    .hb-checkout-grid {
        grid-template-columns: 1fr;
    }
}

.hb-checkout-box {
    background: var(--hb-bg);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    box-shadow: var(--hb-shadow);
    padding: 24px;
}

.hb-box-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    color: var(--hb-secondary);
    border-bottom: 1px solid var(--hb-border);
    padding-bottom: 10px;
}

.hb-form-group {
    margin-bottom: 16px;
}

.hb-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hb-secondary);
    margin-bottom: 6px;
}

.hb-form-group input,
.hb-form-group select,
.hb-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--hb-bg-subtle);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    color: var(--hb-secondary);
    font-size: 14px;
}

.hb-form-group input:focus,
.hb-form-group select:focus,
.hb-form-group textarea:focus {
    border-color: var(--hb-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--hb-primary-light);
}

/* Price summary item */
.hb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--hb-border);
    font-size: 14px;
}

.hb-summary-row.total {
    border-top: 2px solid var(--hb-secondary);
    border-bottom: none;
    font-size: 18px;
    font-weight: 800;
    color: var(--hb-secondary);
    margin-top: 12px;
    padding-top: 12px;
}

.hb-summary-row.total .price {
    color: var(--hb-primary);
}

/* Services selection list */
.hb-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--hb-bg-subtle);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    margin-bottom: 10px;
    cursor: pointer;
}

.hb-coupon-box {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.hb-coupon-box input {
    flex: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .hb-search-form-inner {
        flex-direction: column;
    }
    .hb-search-field, .hb-search-submit {
        width: 100%;
    }
    .hb-btn-primary {
        width: 100%;
    }
}
