/* ==========================================================
   Booking Form – Frontend Styles (FULL FILE)
   ========================================================== */

/* Shared geometry for service cards and bundle offer cards. */
:root { --nb-service-card-radius:12px; }

/* Wrapper */
.nb-booking-wrap {
    width: 100%;
}

/* --------------------------
   REM-BASED TYPOGRAPHY
   -------------------------- */

.nb-booking-wrap,
.nb-booking-wrap * {
    font-size: 1rem !important;
    line-height: 1.4;
}

/* Labels */
.nb-field label {
    font-size: 0.875rem !important;
    font-weight: 500;
    line-height: 1.3;
}

/* Inputs / textareas */
.nb-field input[type="text"],
.nb-field input[type="email"],
.nb-field input[type="tel"],
.nb-field select,
.nb-field textarea {
    font-size: 1rem !important;
}

.nb-field .iti {
    width: 100%;
    display: block;
}

.nb-field .iti,
.nb-field .iti * {
    box-shadow: none;
}

.nb-field .iti input.nb-phone-input {
    width: 100%;
    box-sizing: border-box;
}

.nb-field .iti__selected-country,
.nb-field .iti__selected-country:hover,
.nb-field .iti__selected-country:focus,
.nb-field .iti__selected-country:focus-visible,
.nb-field .iti__selected-country:active,
.nb-field .iti__selected-country-primary,
.nb-field .iti__selected-country-primary:hover,
.nb-field .iti__selected-country-primary:focus,
.nb-field .iti__selected-country-primary:focus-visible,
.nb-field .iti__selected-country-primary:active {
    background: #ffffff !important;
    color: #111111 !important;
    outline: none !important;
    box-shadow: none !important;
}

.nb-field .iti__selected-dial-code {
    font-size: 1rem !important;
    color: #111111 !important;
}

.nb-field .iti__dropdown-content {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.nb-field .iti__country,
.nb-field .iti__country:hover,
.nb-field .iti__country.iti__highlight {
    background: #ffffff !important;
    color: #111111 !important;
}

.nb-field .iti__country:hover,
.nb-field .iti__country.iti__highlight {
    background: #f7f7f7 !important;
}

.nb-field .iti__search-input {
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #dddddd !important;
    border-radius: 6px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 20px !important;
    box-shadow: none !important;
    outline: none !important;
}

.nb-field .iti__search-input::placeholder {
    color: transparent;
}

.nb-field .iti__search-input:focus,
.nb-field .iti__search-input:active {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
    outline: none !important;
}

.nb-field .iti__search-icon {
    top: 50% !important;
    transform: translateY(-50%);
    margin-top: 0 !important;
}

/* Textarea min height */
.nb-field textarea {
    min-height: 100px;
}

.nb-bikebook-customer-message {
    display: none !important;
    margin-top: 4px;
    font-size: 0.75rem !important;
    color: #4b5563;
}

.nb-fields-spacer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 25px;
    box-sizing: border-box;
    background: transparent;
    pointer-events: none;
}

.nb-turnstile-error-spacer[hidden],
.nb-turnstile-error-row[hidden] {
    display: none !important;
}

.nb-fields-row:has([data-field-id="bikebook_services"]) + .nb-fields-spacer-row:has(+ .nb-fields-row:has([data-field-id="notes"])) {
    display: none;
}

.nb-fields-row:has([data-field-id="bikebook_services"]) + .nb-fields-row:has([data-field-id="notes"]),
.nb-fields-row:has([data-field-id="bikebook_services"]) + .nb-fields-spacer-row + .nb-fields-row:has([data-field-id="notes"]) {
    margin-top: 5px;
}

.nb-add-bike-wrap,
.nb-extra-bike-blocks {
    width: 100%;
    box-sizing: border-box;
}

.nb-add-bike-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.nb-add-bike-button {
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: none;
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    background: #0070ba;
    color: #ffffff;
    font-size: 0.875rem !important;
    font-weight: 600;
    line-height: 1.2;
    transition: none;
}

.nb-add-bike-button:hover,
.nb-add-bike-button:focus,
.nb-add-bike-button:active {
    background: #0070ba;
    color: #ffffff;
    transition: none;
}

.nb-extra-bike-controls,
.nb-extra-bike-blocks,
.nb-extra-bike-block {
    display: contents;
}

.nb-fields-row-turnstile {
    width: 100%;
}

.nb-field-turnstile {
    display: flex;
    justify-content: center;
    width: 100%;
}

.nb-turnstile-error {
    color: #e74c3c;
    font-size: 0.95rem !important;
    text-align: center;
    width: 100%;
}

/* Submit button */
.nb-submit {
    font-size: 1rem !important;
    font-weight: 600;
}

/* --------------------------
   CALENDAR
   -------------------------- */

.nb-calendar {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
    box-sizing: border-box;
}

/* Header */
.nb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

/* Month text (bigger + bold) */
.nb-calendar-month-label {
    flex: 1;
    text-align: center;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

/* Navigation arrows – black, no bg */
.nb-cal-nav {
    border: none;
    background: transparent !important;
    cursor: pointer;
    padding: 4px;
    font-size: 1.25rem;
    color: #000000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Weekday labels */
.nb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.5rem;
}

.nb-calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 1rem !important;
}

/* Days grid – wider gaps */
.nb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.7rem; /* 2x-ish wider spacing */
}

/* --------------------------
   CALENDAR DAY CELLS
   -------------------------- */

/* Base day cell – rectangular with 10px corners
   Lock border / shadow / position so hover doesn’t move it */
.nb-cal-day {
    background: #f3f4f6;
    color: #111111;
    border-radius: 10px;
    padding: 8px 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    box-shadow: none !important;

    border: 1px solid transparent; /* same on hover */
    position: relative;
    top: 0;
    transform: none !important;
}

/* Outside month */
.nb-cal-day-outside {
    background: transparent !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* Hover = NiceBike blue, no movement */
.nb-cal-day:hover {
    background: #0070ba;
    color: #ffffff;

    border-color: transparent;
    box-shadow: none !important;
    top: 0;
    transform: none !important;
}

/* Selected date = #34a300, no movement */
.nb-cal-day-selected,
.nb-cal-day.nb-cal-day-selected {
    background: #34a300 !important;
    color: #ffffff !important;
    border-radius: 10px;

    border-color: transparent;
    box-shadow: none !important;
    top: 0;
    transform: none !important;
}

/* Disabled days – no interaction, no hover change at all */
.nb-cal-day-disabled,
.nb-cal-day.nb-cal-day-disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: default;
    border-radius: 10px;

    border: 1px solid transparent;
    box-shadow: none !important;
    pointer-events: none !important;
    top: 0;
    transform: none !important;
}

.nb-cal-day-disabled:hover,
.nb-cal-day-disabled:active,
.nb-cal-day-disabled:focus {
    background: #f9fafb !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    top: 0 !important;
    transform: none !important;
}

/* Hide selected date footer text (but keep line height) */
.nb-calendar-selected-label {
    visibility: hidden !important;
}

/* --------------------------
   SERVICE CARDS
   -------------------------- */

.nb-service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* Base card */
.nb-service-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* TOP ALIGN */
    align-items: flex-start;       /* LEFT ALIGN */

    width: 100%;
    text-align: left !important;

    border-radius: var(--nb-service-card-radius);
    padding: 20px 20px;             /* extra padding */
    border: 1px solid #e5e7eb;

    background: #f9fafb;            /* same as disabled days */
    color: #111111;

    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    box-shadow: none !important;

    position: relative;
    top: 0;
    transform: none !important;
}

/* Force children left aligned */
.nb-service-card * {
    text-align: left !important;
}

/* Hover – blue background, white text, no movement */
.nb-service-card:hover {
    background: #0070ba !important;
    color: #ffffff !important;
    border-color: #0070ba !important;
    box-shadow: none !important;
    top: 0;
    transform: none !important;
}

.nb-service-card:hover .nb-service-card-title,
.nb-service-card:hover .nb-service-card-desc {
    color: #ffffff !important;
}

/* Selected card – #34a300, no movement */
.nb-service-card.nb-card-selected {
    background: #34a300 !important;
    border-color: #34a300 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    top: 0;
    transform: none !important;
}

.nb-service-card.nb-card-selected .nb-service-card-title,
.nb-service-card.nb-card-selected .nb-service-card-desc {
    color: #ffffff !important;
}

/* Title – Komika + letter spacing + more space below */
.nb-service-card-title {
    font-family: "Komika", "Komika Axis", system-ui, sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 700;
    letter-spacing: 0.5px;           /* slightly widened */
    margin-bottom: 8px;              /* more spacing between title & text */
}

/* Body text – normal weight */
.nb-service-card-desc {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400 !important;
}

/* Mobile layout */
@media (max-width: 700px) {
    .nb-service-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Remove mobile tap highlight + focus ring from calendar buttons */
.nb-calendar .nb-cal-day,
.nb-calendar .nb-cal-nav {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Extra safety for focus states */
.nb-calendar .nb-cal-day:focus,
.nb-calendar .nb-cal-day:focus-visible,
.nb-calendar .nb-cal-nav:focus,
.nb-calendar .nb-cal-nav:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Firefox inner focus border */
.nb-calendar button::-moz-focus-inner {
    border: 0;
}

/* Outlines do not change layout or move the page when validation fails. */
.nb-booking-form .nb-invalid {
    outline: 2px solid #ff0000 !important;
    outline-offset: 2px;
}
.nb-booking-form {
    overflow-anchor: none;
}

/* Saved closed weekdays remain selectable only in the availability editor.
   Hard exclusions keep their native disabled state and cannot be overridden. */
.nb-calendar[data-availability-editor] .nb-cal-day-disabled:not(:disabled) {
    pointer-events: auto !important;
    cursor: pointer;
}

/* Shared per-bike actions and one configured, plain-text bundle offer. */
.nb-add-bike-wrap { flex-wrap:wrap; }
.nb-bundle-offer { width:100%; box-sizing:border-box; padding:16px; border-radius:var(--nb-service-card-radius); margin:16px 0; }
.nb-bundle-offer p { white-space:pre-wrap; margin:8px 0 0; }
.nb-bundle-button,.nb-remove-bike-button { cursor:pointer; border:1px solid #0070ba; border-radius:6px; padding:7px 12px; font:inherit; font-size:.875rem; line-height:1.2; }
.nb-remove-bike-button,.nb-remove-bike-button:hover,.nb-remove-bike-button:focus { background:#ffffff; color:#0070ba; border-color:#0070ba; }
.nb-booking-form .nb-bundle-offer[hidden],.nb-booking-form .nb-bundle-button[hidden] { display:none!important; }
/* Override the legacy progressive wrapper's display:contents for real action rows. */
.nb-booking-form .nb-add-bike-wrap { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:16px; }
.nb-booking-form .nb-bundle-button,.nb-booking-form .nb-remove-bike-button { display:inline-flex; align-items:center; justify-content:center; flex:0 1 auto; width:auto!important; max-width:100%; align-self:center; font-size:.875rem!important; font-weight:600; }
.nb-booking-form .nb-remove-bike-button,.nb-booking-form .nb-remove-bike-button:hover,.nb-booking-form .nb-remove-bike-button:focus { background:#ffffff!important; color:#0070ba!important; border:1px solid #0070ba!important; }

.nb-bundle-offer { text-align:center; }
.nb-bundle-offer strong { display:block; }
.nb-bundle-offer strong,.nb-bundle-offer p { text-align:center; }

/* Themify/global button hover shadows must not spill into public booking.
   Keep this separate from focus-visible so keyboard focus remains distinct. */
.nb-booking-form :is(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]):hover {
    box-shadow: none !important;
}
.nb-booking-form :is(button, input[type="button"], input[type="submit"], input[type="reset"], [role="button"]):focus-visible {
    outline: 2px solid #0070ba !important;
    outline-offset: 2px;
}

/* Action buttons stay visually still under theme hover rules. Service cards,
   calendar controls, selected states and focus outlines are deliberately excluded. */
.nb-booking-form :is(.nb-add-bike-button, .nb-remove-bike-button, .nb-bundle-button, .nb-submit) {
    transform: none !important;
    transition: none !important;
}
