/* ============================================================
   HBook Experiences – Front-end & Admin Styles
   ============================================================ */

/* ── Stay banner ─────────────────────────────────────────── */
.hbe-stay-banner {
    background: #f0ede8;
    border-left: 4px solid #b5956a;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: 0.95em;
    border-radius: 3px;
}

/* ── Archive grid ────────────────────────────────────────── */
.hbe-experiences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 24px;
}

.hbe-experience-card {
    border: 1px solid #e0dbd3;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.hbe-experience-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.hbe-card-image-link img,
.hbe-no-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #e8e2d8;
}

.hbe-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hbe-card-title {
    font-size: 1.15em;
    margin-bottom: 8px;
}

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

.hbe-card-excerpt {
    font-size: 0.9em;
    color: #666;
    flex: 1;
    margin-bottom: 12px;
}

.hbe-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.85em;
    margin-bottom: 14px;
    color: #555;
}

.hbe-book-button,
.single_add_to_cart_button {
    background: #b5956a;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.95em;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    transition: background 0.2s ease;
}

.hbe-book-button:hover,
.single_add_to_cart_button:hover {
    background: #9a7b54;
    color: #fff;
}

/* ── Single experience ───────────────────────────────────── */
.hbe-single-experience {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.hbe-experience-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 24px;
}

@media (max-width: 640px) {
    .hbe-experience-wrap {
        grid-template-columns: 1fr;
    }
}

.hbe-experience-image img {
    width: 100%;
    border-radius: 6px;
}

.hbe-experience-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px 0;
    font-size: 0.9em;
    color: #555;
}

/* ── Form fields ─────────────────────────────────────────── */
.hbe-field-group {
    margin-bottom: 0;
}

.hbe-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9em;
}

.hbe-datepicker,
.hbe-guests-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    box-sizing: border-box;
}

/* ── Add row (date + guests + button on one line) ────────── */
.hbe-add-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hbe-field-date  { flex: 2; min-width: 140px; }
.hbe-field-guests{ flex: 1; min-width: 80px;  }
.hbe-field-add   { flex: 0 0 auto; }

.hbe-add-line-btn,
.hbe-add-line-btn.button {
    background: #b5956a !important;
    border: 2px solid #b5956a !important;
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.hbe-add-line-btn:hover,
.hbe-add-line-btn.button:hover {
    background: #9a7b54 !important;
    border-color: #9a7b54 !important;
    color: #fff !important;
}

/* ── Booking basket list ─────────────────────────────────── */
.hbe-booking-list {
    background: #f9f7f4;
    border: 1px solid #e0dbd3;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.hbe-list-heading {
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin: 0 0 10px 0;
}

.hbe-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}

.hbe-list-table th {
    text-align: left;
    padding: 4px 8px 8px;
    font-size: 0.85em;
    color: #888;
    border-bottom: 1px solid #e0dbd3;
}

.hbe-list-table td {
    padding: 8px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.hbe-list-table tfoot td {
    border-bottom: none;
    padding-top: 10px;
    font-size: 1em;
}

.hbe-total-label { color: #333; }
.hbe-total-value { color: #b5956a; font-weight: 700; font-size: 1.1em; }

.hbe-remove-line {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1em;
    padding: 2px 6px;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}
.hbe-remove-line:hover {
    color: #c0392b;
    background: #fdecea;
}

/* ── Flatpickr: already-booked day highlight ─────────────── */
.hbe-day-booked {
    opacity: 0.4;
    text-decoration: line-through;
}

/* ── Hide WooCommerce default price on experience products ── */
.product-type-experience .woocommerce-Price-amount,
.product-type-experience p.price,
.product-type-experience span.price {
    display: none !important;
}

/* ── Pricing label – normal weight, dark, matches WC price area ── */
.hbe-pricing-label {
    font-size: 1.5em;
    font-weight: 500;
    color: #333;
    margin-bottom: 14px;
    line-height: 1.3;
}

.hbe-pricing-label .woocommerce-Price-amount {
    display: inline !important;  /* override the hide rule above for our own label */
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.hbe-pricing-mode {
    font-size: 0.65em;
    font-weight: 400;
    color: #666;
    margin-left: 4px;
    vertical-align: middle;
}

/* ── Classic cart: hide quantity stepper and duplicate price ─ */
.woocommerce-cart-form tr.cart_item:has(dl.variation) .quantity,
.woocommerce-cart-form tr.cart_item:has(dl.variation) td.product-quantity {
    visibility: hidden !important;
}
.woocommerce-cart-form tr.cart_item:has(dl.variation) .product-name .woocommerce-Price-amount {
    visibility: hidden !important;
}


.hbe-error {
    color: #c0392b;
    font-size: 0.9em;
    margin: 4px 0 10px;
    display: block;
}

/* ── Book button: disabled state ─────────────────────────── */
.hbe-book-btn:disabled,
.hbe-book-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Admin dashboard ─────────────────────────────────────── */
.hbe-admin-dashboard h2,
.hbe-admin-calendar h2 {
    margin-top: 28px;
}

.hbe-calendar-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 700px;
    margin-top: 16px;
}

.hbe-calendar-table th,
.hbe-calendar-table td {
    border: 1px solid #ddd;
    width: 14.28%;
    height: 64px;
    vertical-align: top;
    padding: 4px 6px;
    text-align: right;
}

.hbe-calendar-table th {
    background: #f5f5f5;
    text-align: center;
    font-size: 0.85em;
}

.hbe-empty {
    background: #fafafa;
}

.hbe-cal-day {
    position: relative;
}

.hbe-day-num {
    font-weight: 600;
    font-size: 0.9em;
}

.hbe-booked {
    display: block;
    font-size: 0.75em;
    color: #555;
    text-align: center;
    margin-top: 4px;
}

.hbe-free     { background: #eafaea; }
.hbe-partial  { background: #fffbe6; }
.hbe-high     { background: #fdecea; }
.hbe-full     { background: #f5c6cb; }

.hbe-legend span {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    border-radius: 2px;
}

.hbe-legend .hbe-free     { background: #eafaea; }
.hbe-legend .hbe-partial  { background: #fffbe6; }
.hbe-legend .hbe-high     { background: #fdecea; }
.hbe-legend .hbe-full     { background: #f5c6cb; }
