/*
 Theme Name:   Sailing Child
 Theme URI:    http://sailing.thimpress.com/
 Description:  Sailing Child Theme
 Author:       ThimPress
 Author URI:   http://thimpress.com
 Template:     sailing
 Version:      1.0.0
 Text Domain:  sailing-child
*/

/* Brand color for thim-core cookie consent banner/buttons/links.
   The plugin sets --thim-core-primary: var(--thim-body-primary-color, #2563eb)
   — overriding --thim-body-primary-color is the plugin's intended hook. */
body { --thim-body-primary-color: #880000; }

/* Search-room widget: rules transplanted from the uninstalled wp-hotel-booking
   2.3.x plugin's hotel-booking.css (lines 7-24 always-on resets, lines
   1826-1915 @media (max-width:780px) — original `.thim-search-room` context
   generalised here to `.hotel-booking-search` which Sailing actually renders). */
.hotel-booking-search .hb-form-table {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hotel-booking-search .hb-form-table .hb-form-field {
    margin: 0 0 20px 0;
}
/* Desktop submit button: parent theme sets width:100% only inside @media
   (max-width:667px) / 375px blocks, so on wider viewports the button shrinks
   to text width without this. */
.layout-special form p.hb-submit button {
    width: 100%;
}

@media (max-width: 780px) {
    .hotel-booking-search form .hb-form-table {
        width: 100%;
        float: none;
    }
    .hotel-booking-search form .hb-form-table .hb-form-field {
        width: 100%;
        max-width: none;
        float: none;
        margin-bottom: 20px;
    }
    .hotel-booking-search form .hb-submit {
        width: 100%;
        float: none;
    }
    .hotel-booking-search form .hb-submit button {
        max-width: none;
        width: 100%;
    }
}

/* Adults <select> is locked: Hugo's booking.php has no documented public
   guest-count parameter, so we render the value but block interaction.
   `aria-disabled` + `pointer-events:none` keeps the form's native styling
   while signalling state to assistive tech (`disabled` would trigger the
   UA's grey background, which clashes with the white form background). */
.hotel-booking-search form select[aria-disabled="true"] {
    pointer-events: none;
}

/* jQuery UI Datepicker trigger button is rendered invisible: the click area
   stays (the button overlays the entire .hb-form-field-input, so tapping
   anywhere opens the picker), but no glyph is shown. The parent sailing CSS
   uses mask-image (calendar-new.svg) with !important, so we have to use
   !important here too to unset it. */
.hotel-booking-search form .hb-form-field-input button.ui-datepicker-trigger {
    background: transparent !important;
    border: none;
    -webkit-mask: none !important;
    mask: none !important;
}
.hotel-booking-search form .hb-form-field-input button.ui-datepicker-trigger i {
    display: none;
}

/* Center the locked guests <select> value to match the centered day numerals
   in the date columns. Parent CSS only centers .day, not the select. */
.hotel-booking-search form .hb-guest-field select {
    text-align: center;
    text-align-last: center;
}
