/**
 * Tindioru Booking - Public Styles
 * Calendar, booking form, and payment selection.
 */

/* ===== WRAPPER ===== */
.tb-booking-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
    color: #333;
}

/* ===== CALENDAR ===== */
.tb-calendar {
    margin-bottom: 30px;
}

.tb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 5px;
}

.tb-calendar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-transform: capitalize;
}

.tb-calendar-nav {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.tb-calendar-nav:hover {
    background: #e8e8e8;
}

.tb-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Weekday headers */
.tb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Days grid */
.tb-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    /* Let the browser handle vertical scrolling normally, but reserve
       horizontal gestures for our swipe handler. Without this the browser
       may try to bounce/pan horizontally while the finger is dragging,
       which fights the transform: translateX we apply in JS. */
    touch-action: pan-y;
    /* Hint to the browser that this element will animate via transform,
       so it can compose it on its own layer and skip layout work. */
    will-change: transform;
}

/* Individual day cell */
.tb-day {
    position: relative;
    aspect-ratio: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    transition: background 0.15s;
    user-select: none;
    overflow: hidden;
}

.tb-day:hover:not(.tb-day--past):not(.tb-day--booked):not(.tb-day--blocked):not(.tb-day--empty) {
    background: #e8f4e8;
}

.tb-day--empty {
    cursor: default;
}

.tb-day--past {
    color: #ccc;
    cursor: not-allowed;
}

.tb-day--past .tb-day-number {
    color: #ccc;
}

/* Available */
.tb-day--available {
    background: #fff;
    color: #333;
}

/* Booked / unavailable */
.tb-day--booked {
    background: #f8d7da;
    color: #999;
    cursor: not-allowed;
}

/* Blocked (iCal, manual) */
.tb-day--blocked {
    background: #e9ecef;
    color: #aaa;
    cursor: not-allowed;
}

/* Selected range */
.tb-day--selected {
    background: #0E3A2F !important;
    color: #fff !important;
}

.tb-day--in-range {
    background: #DCE5DF !important;
    color: #0E3A2F !important;
}

/* ===== CHECKOUT/TURNOVER DAYS ===== */
/* Checkout days are AVAILABLE - guest left in the morning, new guest can arrive */
.tb-day--turnover,
.tb-day--checkout-only {
    background: #fff;
    color: #333;
    cursor: pointer;
}

/* Check-in day of existing booking - booked, not clickable */
.tb-day--checkin-only {
    background: #f8d7da;
    color: #999;
    cursor: not-allowed;
}

/* Highlight for selectable checkout days during checkout selection */
.tb-day--checkout-hint {
    z-index: 3;
    position: relative;
    cursor: pointer !important;
}

/* Diagonal split for "checkout-hint" days: morning (top-left) is white —
   you can check out then. Afternoon (bottom-right) is pink — the next
   guest checks in. The split reads left-to-right and top-to-bottom in
   time order, which matches how Estonian readers parse a calendar tile. */
.tb-day.tb-day--booked.tb-day--checkout-hint,
.tb-day.tb-day--blocked.tb-day--checkout-hint,
.tb-day.tb-day--turnover.tb-day--checkout-hint {
    cursor: pointer !important;
    background: linear-gradient(135deg,
        #fff 0%,
        #fff 50%,
        #F3DDD2 50%,
        #F3DDD2 100%) !important;
    border-color: #ddd !important;
    color: #333 !important;
}
.tb-day.tb-day--booked.tb-day--checkout-hint .tb-day-number,
.tb-day.tb-day--blocked.tb-day--checkout-hint .tb-day-number,
.tb-day.tb-day--turnover.tb-day--checkout-hint .tb-day-number {
    color: #333 !important;
    /* Number sits in the upper-left (the white "available to leave" half) */
    position: relative;
    top: -2px;
    left: -2px;
}

/* Hover on the diagonal day: only the WHITE (morning / "you can leave")
   half turns green — the pink (afternoon / next booking) half stays pink.
   This makes the clickable half visually obvious without pretending the
   whole day is available. */
.tb-day.tb-day--booked.tb-day--checkout-hint:hover,
.tb-day.tb-day--blocked.tb-day--checkout-hint:hover,
.tb-day.tb-day--turnover.tb-day--checkout-hint:hover,
.tb-day--checkout-hint:hover {
    background: linear-gradient(135deg,
        #DCE5DF 0%,
        #DCE5DF 50%,
        #F3DDD2 50%,
        #F3DDD2 100%) !important;
    border-color: #0E3A2F !important;
}

/* Helpful explanation under the calendar instruction when checkout-hint is shown */
.tb-checkout-hint-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f7f0;
    border-left: 3px solid #0E3A2F;
    border-radius: 4px;
    font-size: 13px;
    color: #0E3A2F;
    line-height: 1.4;
}

/* Dead zone — days past the checkout hint that are unreachable due to a booked
   day in between. Visually dimmed so it's clear they're not valid checkouts, but
   still clickable: a click restarts the selection with that day as the new check-in. */
.tb-day--past-hint {
    opacity: 0.4;
    cursor: pointer;
}
.tb-day--past-hint:hover {
    background: #f5f5f5 !important;
    border-color: #ddd !important;
    opacity: 0.65;
}
.tb-day--past-hint .tb-day-price {
    display: none;
}

/* Calendar instruction text */
.tb-calendar-instruction {
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: #0E3A2F;
    min-height: 20px;
}

.tb-reset-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s;
}

.tb-reset-btn:hover {
    border-color: #a00;
    color: #a00;
}

/* Day number */
.tb-day-number {
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* Price under day number */
.tb-day-price {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: #666;
    z-index: 2;
}

.tb-day--booked .tb-day-price,
.tb-day--blocked .tb-day-price {
    display: none;
}

/* ===== MOBILE: stack day number above price with proper spacing ===== */
@media (max-width: 600px) {
    .tb-day {
        aspect-ratio: 1; /* square ruudud, et oleks kõik ühesuurused */
        font-size: 13px;
        flex-direction: column;
        gap: 1px;
        padding: 4px 0;
    }
    .tb-day-number {
        font-size: 13px;
        line-height: 1;
    }
    .tb-day-price {
        position: static; /* eemaldame absoluutpositsioneerimise */
        font-size: 9px;
        line-height: 1;
        padding: 0 1px;
    }
    /* Reclaim horizontal space on phones: the 8px inner padding eats two
       padding-bands (left + right), making each day cell ~16px narrower
       than it needs to be. On phones the cells already include their own
       borders + the .tb-calendar-days grid, so the wrapper padding adds
       nothing visual. */
    .tb-calendar {
        padding: 0 !important;
    }
    /* The outer card padding is 24px (set in v3.1.2) — fine on desktop,
       too wasteful on phones where it eats ~48px of horizontal room and
       leaves the calendar cells small. Drop it to 10px on phones. */
    .tb-booking-wrapper {
        padding: 12px !important;
    }
}

@media (max-width: 380px) {
    .tb-day {
        font-size: 12px;
    }
    .tb-day-price {
        font-size: 8px;
    }
}

/* ===== LEGEND ===== */
.tb-calendar-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.tb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tb-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.tb-legend-color--available {
    background: #fff;
}

.tb-legend-color--booked {
    background: #f8d7da;
}

.tb-legend-color--selected {
    background: #0E3A2F;
}

/* ===== SELECTED DATES SUMMARY ===== */
.tb-dates-summary {
    background: #DCE5DF;
    border: 1px solid #0E3A2F;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: none;
}

.tb-dates-summary.is-visible {
    display: block;
}

.tb-dates-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.tb-dates-summary-row:last-child {
    margin-bottom: 0;
}

.tb-dates-summary-label {
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.tb-dates-summary-value {
    font-size: 14px;
    color: #333;
}

.tb-dates-summary-total {
    font-size: 18px;
    font-weight: 700;
    color: #0E3A2F;
    border-top: 1px solid #B8CEC0;
    padding-top: 8px;
    margin-top: 8px;
}

/* ===== CROSS-SELL INLINE ===== */
.tb-cross-sell-inline {
    margin-bottom: 18px;
    padding: 12px 15px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
}

.tb-cross-sell-link {
    font-size: 14px;
    color: #666;
}

.tb-cross-sell-link a {
    color: #0E3A2F;
    font-weight: 600;
    text-decoration: none;
}

.tb-cross-sell-link a:hover {
    text-decoration: underline;
}

.tb-cross-sell-confirmed {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #0E3A2F;
    font-weight: 500;
}

/* Hide old cross-sell popup */
.tb-cross-sell {
    display: none !important;
}

/* ===== BOOKING FORM ===== */
.tb-form {
    display: none;
}

.tb-form.is-visible {
    display: block;
}

.tb-form-group {
    margin-bottom: 18px;
    position: relative;
}

.tb-form-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 400;
    color: #888;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1;
}

.tb-form-group input:focus ~ label {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: #0E3A2F;
}

.tb-form-group input:not(:placeholder-shown) ~ label {
    display: none;
}

.tb-form-group select:focus ~ label {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: #0E3A2F;
}

.tb-form-group .tb-label--up {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: #555;
}

.tb-form-group input,
.tb-form-group select,
.tb-form-group textarea {
    display: block;
    width: 100%;
    padding: 22px 12px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.tb-form-group textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.4;
    padding: 12px;
}

.tb-form-group input::placeholder {
    color: transparent;
}

.tb-form-group textarea::placeholder {
    color: #888;
    font-size: 15px;
    opacity: 1;
}

.tb-form-group input:focus,
.tb-form-group select:focus,
.tb-form-group textarea:focus {
    outline: none;
    border-color: #0E3A2F;
}

/* Red asterisk on required field labels.
   Required = NOT optional. Optional fields explicitly carry .tb-form-group--optional. */
.tb-form-group:not(.tb-form-group--optional) > label::after {
    content: ' *';
    color: #d32f2f;
    font-weight: 700;
}

/* Invalid state — red border + light red background on the input */
.tb-form-group.tb-field-invalid input,
.tb-form-group.tb-field-invalid select {
    border-color: #d32f2f !important;
    background-color: #fff5f5;
}

.tb-form-group.tb-field-invalid > label {
    color: #d32f2f;
}

/* "Soovin arvet ettevõttele" tšekkboks */
.tb-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
    font-size: 15px;
    color: #444;
}

.tb-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0E3A2F;
    margin: 0;
    flex-shrink: 0;
}

.tb-checkbox-row span {
    line-height: 1.4;
}

.tb-form-group--optional label::after {
    content: " (valikuline)";
    font-weight: 400;
    color: #999;
    font-size: 11px;
}

.tb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .tb-form-row {
        grid-template-columns: 1fr;
        gap: 0; /* margin-bottom on .tb-form-group already provides the gap */
    }
}

/* ===== PAYMENT SELECTION ===== */
.tb-payment-options {
    margin-top: 24px;
    margin-bottom: 25px;
}

.tb-payment-options h4 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 12px;
}

.tb-payment-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.tb-payment-option:hover:not(.is-selected) {
    border-color: #ccc;
}

.tb-payment-option.is-selected {
    border-color: #0E3A2F;
    background: #DCE5DF;
}

.tb-payment-option input[type="radio"] {
    margin-top: 5px;
    flex-shrink: 0;
}

.tb-payment-option-label {
    font-weight: 600;
    font-size: 14px;
}

.tb-payment-option-desc {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

/* ===== DISCOUNT CODE ===== */
.tb-discount-section {
    margin-bottom: 25px;
}

.tb-discount-row {
    display: flex;
    gap: 10px;
}

.tb-discount-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tb-discount-row button {
    padding: 10px 20px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.tb-discount-row button:hover {
    background: #333;
}

.tb-discount-message {
    font-size: 13px;
    margin-top: 6px;
}

.tb-discount-message--success {
    color: #0E3A2F;
}

.tb-discount-message--error {
    color: #c62828;
}

/* ===== SUBMIT ===== */
.tb-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #E67557;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}

.tb-submit-btn:hover {
    background: #C9573D;
}

.tb-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ===== LOADING ===== */
.tb-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* ===== BANK SELECTION ===== */
.tb-bank-selection {
    margin-bottom: 25px;
}

.tb-bank-selection h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.tb-banks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .tb-banks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tb-bank-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 50px;
    background: #fff;
}

.tb-bank-item:hover:not(.is-selected) {
    border-color: #ccc;
}

.tb-bank-item.is-selected {
    border-color: #0E3A2F;
    background: #ffffff;
}

.tb-bank-item img {
    max-height: 22px;
    max-width: 80px;
    object-fit: contain;
}

/* ===== ERROR ===== */
.tb-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ===========================================
   v3.1.2 — VISUAALSED UUENDUSED
   Puhtam, kaardilaadne disain
   =========================================== */

/* Põhi wrapper - lisame pehmema serva ja pehmemma sisemise paigutuse */
.tb-booking-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #ececec;
}

/* Kalender - puhtam disain */
.tb-calendar {
    background: #ffffff;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 16px;
}

.tb-calendar-header {
    padding: 8px 0 16px;
}

.tb-month-title {
    font-size: 18px;
    font-weight: 500;
    color: #2c2c2c;
}

/* Kuupäeva lahter - kompaktsem, ilusam */
.tb-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    cursor: default;
    padding: 4px;
    /* min-height eemaldatud - lubab kalendril vabalt skaleeruda
       kui aken kitsamaks, ilma et sisu peitu jääks */
}

.tb-day-number {
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c;
    line-height: 1;
}

.tb-day-price {
    font-size: 11px;
    color: #777;
    margin-top: 2px;
    line-height: 1;
}

/* Möödunud kuupäev */
.tb-day--past {
    color: #ccc;
    cursor: not-allowed;
}
.tb-day--past .tb-day-number {
    color: #ccc;
}

/* Saadaval */
.tb-day--available {
    background: #ffffff;
    border-color: #e8e8e8;
    cursor: pointer;
}
.tb-day--available:hover {
    background: #f5fbf3;
    border-color: #84a45c;
}

/* Broneeritud (heleroosa) */
.tb-day--booked,
.tb-day--blocked {
    background: #fdeaea;
    color: #c66;
    cursor: not-allowed;
}
.tb-day--booked .tb-day-number,
.tb-day--blocked .tb-day-number {
    color: #c66;
}

/* Valitud (roheline) */
.tb-day--selected {
    background: #0E3A2F !important;
    border-color: #0E3A2F !important;
}
.tb-day--selected .tb-day-number {
    color: #ffffff !important;
    font-weight: 600;
}
.tb-day--selected .tb-day-price {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Vahepealne (range) */
.tb-day--in-range {
    background: #e8f5e9;
    border-color: #0E3A2F;
}
.tb-day--in-range .tb-day-number {
    color: #0E3A2F;
}

/* Summary panel - taustaga */
.tb-summary {
    background: #f5fbf3;
    border: 1px solid #0E3A2F;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
}

.tb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.tb-summary-row:last-child {
    border-top: 1px solid #B8CEC0;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    font-size: 16px;
}

/* Form input väljad - pehmemad */
.tb-form input[type="text"],
.tb-form input[type="email"],
.tb-form input[type="tel"],
.tb-form select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-form input:focus,
.tb-form select:focus {
    border-color: #0E3A2F;
    outline: none;
}

/* Tasumisviis kaartid */
.tb-payment-option {
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}

.tb-payment-option:hover:not(.is-selected) {
    border-color: #84a45c;
    background: #fafdf8;
}

.tb-payment-option.is-selected {
    border-color: #0E3A2F;
    background: #DCE5DF;
}

/* Bank logos - pisem padding, hover effect */
.tb-banks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.tb-bank-option {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}

.tb-bank-option:hover {
    border-color: #84a45c;
    transform: translateY(-1px);
}

.tb-bank-option.is-selected {
    border-color: #0E3A2F;
    background: #DCE5DF;
}

/* Broneeri nupp - roheline (asemel oranži) */
.tb-submit-btn {
    background: #0E3A2F;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-top: 16px;
}

.tb-submit-btn:hover {
    background: #1b5e20;
}

.tb-submit-btn:active {
    transform: scale(0.99);
}

/* Sooduskood */
.tb-discount-row input {
    border-radius: 6px 0 0 6px;
}

.tb-discount-row button {
    background: #555;
    color: #fff;
    border-radius: 0 6px 6px 0;
    padding: 0 16px;
}

.tb-discount-row button:hover {
    background: #333;
}

/* Kogu kompleksi sektsioon — väike loomulik vahekoht */
.tb-complex-upsell {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #ececec;
}

.tb-complex-btn-primary {
    transition: all 0.15s ease;
}

.tb-complex-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}


/* ===========================================
   v3.1.8 — TÄIENDUSED v3.1.2 PEALE
   1) Broneeri nupp oranži (#b96748)
   2) Mobile - kuupäevad väiksemaks, mitte peitu
   =========================================== */

/* Broneeri nupp - Tindioru oranži aktsendiga */
.tb-submit-btn {
    background: #b96748 !important;
    color: #ffffff !important;
}
.tb-submit-btn:hover {
    background: #9d5238 !important;
}

/* Mobiil — kalender väiksemaks, mitte peitu */
@media (max-width: 768px) {
    .tb-day {
        aspect-ratio: auto !important;
        min-height: 50px !important;
        padding: 4px 2px !important;
    }
    .tb-day-number {
        font-size: 13px !important;
    }
    .tb-day-price {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .tb-day {
        min-height: 44px !important;
        padding: 2px !important;
    }
    .tb-day-number {
        font-size: 12px !important;
    }
    .tb-day-price {
        font-size: 9px !important;
    }
}

/* ===========================================
   v3.1.10 — KALENDRI RESPONSIIVSUS
   Lahtri suurus skaleerub aknast - sisu ei lähe peitu
   =========================================== */

/* Brauseri kokku tõmmatud (700-1024px) - vähenda padding */
@media (max-width: 1024px) {
    .tb-day {
        padding: 2px !important;
    }
    .tb-day-number {
        font-size: 13px !important;
    }
    .tb-day-price {
        font-size: 10px !important;
    }
}

/* Veel kitsam - veel väiksem */
@media (max-width: 768px) {
    .tb-day-number {
        font-size: 12px !important;
    }
    .tb-day-price {
        font-size: 9px !important;
    }
}

/* Mobiil - aspect-ratio võib muutuda et lahter mahuks */
@media (max-width: 480px) {
    .tb-day {
        aspect-ratio: auto !important;
        min-height: 44px !important;
    }
}


/* ===========================================
   v3.1.11 — DROPDOWN LABEL FIX (TAGASI)
   Külastajate arv + Sinu saabumisaeg - label ei kattu enam tekstiga
   =========================================== */

/* Suurem padding-top selectis, et tekst läheks labelist allapoole */
.tb-form-group select {
    padding-top: 26px !important;
    padding-bottom: 8px !important;
    line-height: 1.2;
}

/* Üleval olev label - selgemini positsioneeritud */
.tb-form-group .tb-label--up {
    top: 4px !important;
    background: transparent;
    z-index: 2;
}


/* ===========================================
   v3.1.12 — Lahtrite vahel väike vahe
   =========================================== */

.tb-calendar-days {
    gap: 4px !important;
}


/* ===========================================
   v3.1.16 — TINDIORU ÜHTNE VÄRVIPALETT
   - Roheline aktsent: #0E3A2F (sügav metsaroheline)
   - Vahepealne: #DCE5DF (pehme sage)
   - Broneeritud: #F3DDD2 (Tindioru oranji toon)
   - Broneeri nupp: #b96748 (juba olemas)
   =========================================== */

/* KALENDER */

/* Valitud kuupäev - sügav metsaroheline */
.tb-day--selected {
    background: #0E3A2F !important;
    border-color: #0E3A2F !important;
    color: #ffffff !important;
}
.tb-day--selected .tb-day-number {
    color: #ffffff !important;
    font-weight: 600;
}
.tb-day--selected .tb-day-price {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Vahepealne (range) - pehme sage */
.tb-day--in-range {
    background: #DCE5DF !important;
    border-color: #DCE5DF !important;
    color: #0E3A2F !important;
}
.tb-day--in-range .tb-day-number,
.tb-day--in-range .tb-day-price {
    color: #0E3A2F !important;
}

/* Broneeritud - Tindioru oranji toon */
.tb-day--booked,
.tb-day--blocked {
    background: #F3DDD2 !important;
    color: #8C4527 !important;
    border-color: transparent !important;
}
.tb-day--booked .tb-day-number,
.tb-day--blocked .tb-day-number {
    color: #8C4527 !important;
}

/* Hover - heleroheline */
.tb-day--available:hover {
    background: #F0F5F1 !important;
    border-color: #0E3A2F !important;
}

/* INSTRUKTSIOON ("Vali saabumiskuupäev") - roheline */
.tb-calendar-instruction {
    color: #0E3A2F !important;
}

/* LEGEND - värvilised kasti tutvustused */
.tb-legend-color--available {
    background: #ffffff !important;
    border-color: #e8e8e8 !important;
}
.tb-legend-color--booked {
    background: #F3DDD2 !important;
}
.tb-legend-color--selected {
    background: #0E3A2F !important;
}
.tb-legend-color--checkout-hint {
    background: linear-gradient(135deg,
        #fff 0%,
        #fff 50%,
        #F3DDD2 50%,
        #F3DDD2 100%) !important;
    border-color: #ddd !important;
}

/* SUMMARY (Saabumine / Lahkumine / Kokku kast) - heleroheline */
.tb-summary {
    background: #F0F5F1 !important;
    border-color: #DCE5DF !important;
}

/* TASUMISVIIS KAARDID */
.tb-payment-option.is-selected {
    border-color: #0E3A2F !important;
    background: #F0F5F1 !important;
}

/* PANK VALIK KAARDID */
.tb-bank-option.is-selected,
.tb-bank-option--selected {
    border-color: #0E3A2F !important;
    background: #F0F5F1 !important;
}

/* INPUT VÄLJADE FOCUS */
.tb-form-group input:focus,
.tb-form-group select:focus {
    border-color: #0E3A2F !important;
}
.tb-form-group input:focus ~ label,
.tb-form-group select:focus ~ label {
    color: #0E3A2F !important;
}

/* KOGU KOMPLEKSI NUPP - sügav metsaroheline aktsent */
.tb-complex-btn-primary {
    background: #F0F5F1 !important;
    border-color: #0E3A2F !important;
    color: #0E3A2F !important;
}
.tb-complex-btn-primary:hover {
    background: #DCE5DF !important;
}

/* DROPDOWN'i ÜLEVAL LABEL - kogu kompleksi seest */
.tb-form-group input:focus ~ label,
.tb-form-group select:focus ~ label,
.tb-form-group .tb-label--up {
    color: #0E3A2F !important;
}


/* ===========================================
   v3.1.17 — Hover ainult vabadel kuupäevadel
   Valitud / vahepealne / broneeritud / möödunud - hover EI tekita
   =========================================== */

/* Valitud kuupäev - hover JÄÄB SAMAKS (ei muutu) */
.tb-day--selected:hover {
    background: #0E3A2F !important;
    border-color: #0E3A2F !important;
    cursor: default !important;
}

/* Vahepealne - hover JÄÄB SAMAKS */
.tb-day--in-range:hover {
    background: #DCE5DF !important;
    border-color: #DCE5DF !important;
    cursor: default !important;
}

/* Broneeritud - hover JÄÄB SAMAKS */
.tb-day--booked:hover,
.tb-day--blocked:hover {
    background: #F3DDD2 !important;
    cursor: not-allowed !important;
}

/* Möödunud - hover JÄÄB SAMAKS */
.tb-day--past:hover {
    background: transparent !important;
    cursor: not-allowed !important;
}


/* ===========================================
   v3.1.18 — Summary + Tasumisviis taust #DCE5DF
   =========================================== */

/* SUMMARY (Saabumine/Lahkumine/Kokku kast) - vahepealne värv */
.tb-summary {
    background: #DCE5DF !important;
    border: 1px solid #0E3A2F !important;
}

/* Triibu eraldaja (Ööde arv ja Kokku vahel) */
.tb-summary > div:last-child,
.tb-summary > *:last-child {
    border-top-color: #B8CEC0 !important;
}

/* TASUMISVIIS VALITUD KAART */
.tb-payment-option.is-selected {
    background: #DCE5DF !important;
    border-color: #0E3A2F !important;
}

/* PANK VALITUD KAART */
.tb-bank-option.is-selected,
.tb-bank-option--selected {
    background: #DCE5DF !important;
    border-color: #0E3A2F !important;
}

/* KOGU KOMPLEKSI NUPP - vaikimisi */
.tb-complex-btn-primary {
    background: #DCE5DF !important;
    border-color: #0E3A2F !important;
    color: #0E3A2F !important;
}
.tb-complex-btn-primary:hover {
    background: #C0D2C5 !important;
}


/* Summary-row eraldaja (Kokku rea kohal) - sobiv border */
.tb-summary-row:last-child {
    border-top-color: #B8CEC0 !important;
}


/* ===========================================
   v3.1.19 — Õige selektor: tb-dates-summary
   =========================================== */

.tb-dates-summary {
    background: #DCE5DF !important;
    border-color: #0E3A2F !important;
}

.tb-dates-summary-row:last-child {
    border-top-color: #B8CEC0 !important;
}


/* ===========================================
   v3.1.20 — Pank valikud ühtne border
   - Valitud pank: AINULT border (mitte tausta värvi)
   - Vana #0E3A2F asendatakse #0E3A2F
   =========================================== */

/* Bank item - valitud puhul AINULT border (mitte taust) */
.tb-bank-item.is-selected {
    border-color: #0E3A2F !important;
    background: #ffffff !important;
}

/* Tasumisviis - valitud puhul border ja taust korralikud */
.tb-payment-option.is-selected {
    border-color: #0E3A2F !important;
    background: #DCE5DF !important;
}


/* ===========================================
   v3.1.21 — Pangad ja tasumisviis ühtne border
   - Tavaline: 1px solid #e0e0e0
   - Valitud: 1px solid #0E3A2F + #DCE5DF taust
   =========================================== */

/* TAVALINE pank kaart - ühtne border */
.tb-bank-item {
    border: 1px solid #e0e0e0 !important;
}

/* VALITUD pank kaart - AINULT border, valge taust */
.tb-bank-item.is-selected {
    border: 1px solid #0E3A2F !important;
    background: #ffffff !important;
}

/* Hover - mitte muuda border-i nähtavaks */
.tb-bank-item:hover:not(.is-selected) {
    border-color: #ccc !important;
}

/* TAVALINE tasumisviis kaart - sama border */
.tb-payment-option {
    border: 1px solid #e0e0e0 !important;
}

/* VALITUD tasumisviis - sama mis pildi 2 */
.tb-payment-option.is-selected {
    border: 1px solid #0E3A2F !important;
    background: #DCE5DF !important;
}

/* Hover */
.tb-payment-option:hover:not(.is-selected) {
    border-color: #ccc !important;
}


/* ===========================================
   v3.1.29 — Checkout-only kuupäev valitud
   Kui lahkumiskuupäev on samal päeval kui broneeritud lahter
   (checkout-only/turnover) - näita SELECTED (mitte broneeritud)
   =========================================== */

/* Selected ülekirjutab booked - kõrgem specificity */
.tb-day--booked.tb-day--selected,
.tb-day--blocked.tb-day--selected {
    background: #0E3A2F !important;
    color: #ffffff !important;
    border-color: #0E3A2F !important;
}

.tb-day--booked.tb-day--selected .tb-day-number,
.tb-day--blocked.tb-day--selected .tb-day-number {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Sama selected:hover - jääb tume kui hover'id */
.tb-day--booked.tb-day--selected:hover,
.tb-day--blocked.tb-day--selected:hover {
    background: #0E3A2F !important;
    border-color: #0E3A2F !important;
}


/* ===========================================
   v3.1.30 — Property info kaart
   Shortcode: [tindioru_property_info property="..."]
   =========================================== */

.tb-property-info-card {
    background: #FAF7F1;
    border: 1px solid #EFE9DA;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    max-width: 100%;
    font-family: inherit;
    color: #333;
}

/* Hind sektsioon - üleval */
.tb-property-info-price-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #EFE9DA;
}

.tb-property-info-price-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.tb-property-info-price {
    font-size: 32px;
    font-weight: 700;
    color: #222222;
    line-height: 1;
}

/* 2x2 grid ikoonidega */
.tb-property-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
    font-size: 14px;
    color: #333;
}

.tb-property-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-property-info-icon {
    color: #222222;
    flex-shrink: 0;
}

.tb-property-info-item strong {
    font-weight: 600;
    color: #2c2c2c;
}

.tb-property-info-times {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Voodikohad - kokkupandud details */
.tb-property-info-beds {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #EFE9DA;
}

.tb-property-info-beds summary {
    font-size: 13px;
    color: #222222;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    list-style: none;
    position: relative;
    padding-left: 18px;
}

.tb-property-info-beds summary::-webkit-details-marker {
    display: none;
}

.tb-property-info-beds summary::before {
    content: '▸';
    position: absolute;
    left: 0;
    transition: transform 0.15s ease;
}

.tb-property-info-beds[open] summary::before {
    transform: rotate(90deg);
}

.tb-property-info-beds summary:hover {
    color: #000000;
}

.tb-property-info-beds-list {
    font-size: 13px;
    color: #555;
    margin-top: 10px;
    padding-left: 18px;
    line-height: 1.8;
}

.tb-property-info-beds-list > div {
    padding: 2px 0;
}

/* Mobile - 1 veerg */
@media (max-width: 600px) {
    .tb-property-info-card {
        padding: 16px 18px;
    }
    .tb-property-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tb-property-info-price {
        font-size: 26px;
    }
}


/* ===========================================
   v3.1.32 — Property info kompaktsem reavahe
   =========================================== */

/* Kogu info kastis kompaktsem line-height (Tindioru teemast päritakse 1.7+) */
.tb-property-info-card {
    line-height: 1.4 !important;
}

/* Hinda lähemale - väiksem gap */
.tb-property-info-price-section {
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
}

.tb-property-info-price {
    line-height: 1 !important;
}

/* Grid - kompaktsem */
.tb-property-info-grid {
    gap: 10px 18px !important;
    line-height: 1.3 !important;
}

.tb-property-info-item {
    line-height: 1.3 !important;
}

.tb-property-info-item span {
    line-height: 1.3 !important;
}

/* Voodikohad - kompaktsem */
.tb-property-info-beds {
    margin-top: 14px !important;
    padding-top: 12px !important;
}

.tb-property-info-beds-list {
    line-height: 1.5 !important;
}

.tb-property-info-beds-list > div {
    padding: 1px 0 !important;
}


/* ===========================================
   v3.1.33 — Pangaikoonid mobile fix
   Logod ei jookse välja
   =========================================== */

/* Banks grid - ei jookse välja */
.tb-banks-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tb-bank-item {
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tb-bank-item img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 22px !important;
    object-fit: contain !important;
}

/* Mobile <600px - 3 veergu (oli juba) */

/* Väike mobiil <480px - 2 veergu, et logod mahuksid */
@media (max-width: 480px) {
    .tb-banks-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ===========================================
   v3.1.95 — SAFARI SELECT FIX + CHECKBOX NOWRAP
   - Safari renders <select> with vertical-align: middle by default,
     ignoring padding-top. The result: the floating label overlaps
     the selected option text. Fix: appearance: none + explicit
     line-height, plus a custom dropdown arrow via SVG background.
   - "Soovin arvet ettevõttele" label was wrapping to two lines on
     narrow viewports. Force single line.
   =========================================== */

.tb-form-group select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Custom dropdown arrow (chevron-down SVG, dark grey) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23555' stroke-width='2' d='M1 1l5 5 5-5'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-color: #fff !important;
    padding-right: 36px !important;
    /* Explicit line-height so the option text sits where padding expects */
    line-height: 1.2 !important;
}

/* Keep the checkbox label on one line. */
.tb-checkbox-row {
    flex-wrap: nowrap !important;
}
.tb-checkbox-row span {
    white-space: nowrap !important;
}


/* ===========================================
   v3.1.108 — DISABLE STICKY HOVER ON TOUCH DEVICES
   On touch devices ("hover: none") the :hover pseudo-class fires when the
   user taps and stays active until they tap somewhere else — making
   calendar cells look stuck in the hover (light green) state long after
   the tap. Override every :hover rule that changes background or border
   to inherit (no-op) when there's no real pointer.

   We only target the calendar cells; form inputs and buttons can still
   show their :hover style because they don't visually mislead in the
   same way.
   =========================================== */
@media (hover: none) {
    .tb-day:hover,
    .tb-day:hover:not(.tb-day--past):not(.tb-day--booked):not(.tb-day--blocked):not(.tb-day--empty),
    .tb-day--available:hover,
    .tb-day--selected:hover,
    .tb-day--in-range:hover,
    .tb-day--past-hint:hover,
    .tb-day.tb-day--booked.tb-day--checkout-hint:hover,
    .tb-day.tb-day--blocked.tb-day--checkout-hint:hover,
    .tb-day.tb-day--turnover.tb-day--checkout-hint:hover,
    .tb-day--checkout-hint:hover {
        background: inherit;
        background-image: none;
        border-color: inherit;
    }
    /* For the diagonal checkout-hint day specifically, "inherit" wipes the
       gradient we set as the resting background. Re-apply it so the day
       still shows its split look on tap. */
    .tb-day.tb-day--booked.tb-day--checkout-hint:hover,
    .tb-day.tb-day--blocked.tb-day--checkout-hint:hover,
    .tb-day.tb-day--turnover.tb-day--checkout-hint:hover {
        background: linear-gradient(135deg,
            #fff 0%,
            #fff 50%,
            #F3DDD2 50%,
            #F3DDD2 100%) !important;
        border-color: #ddd !important;
    }
    /* Selected day stays in its dark green resting state on tap. */
    .tb-day--selected:hover {
        background: #0E3A2F !important;
        border-color: #0E3A2F !important;
    }
    /* In-range days stay in their soft sage resting state on tap. */
    .tb-day--in-range:hover {
        background: #DCE5DF !important;
        border-color: #DCE5DF !important;
    }
}
