/*
 * ETG Tour Inquiry form.
 *
 * Every rule is scoped to .etg-tif. In the snippet this replaced, the styles
 * were printed inline with selectors like `*`, `input`, `textarea`, `select`
 * and `button[type="submit"]`, which applied to the whole page, not the form:
 * on the home page that reset the margin and padding of every element on the
 * page and restyled the theme's own inputs, its login modal and the tour
 * booking form. Nothing here can reach outside the form again.
 */

.etg-tif *,
.etg-tif *::before,
.etg-tif *::after {
    box-sizing: border-box;
}

/*
 * The snippet's reset, kept so the form looks the same, but confined - and
 * deliberately NOT applied to `div`.
 *
 * intl-tel-input builds its flag box, its selected-flag button and its country
 * rows out of divs and spaces them with their own margin and padding. A blanket
 * `div { margin: 0; padding: 0 }` flattens all of it, which is exactly why the
 * dial code sat against the flag and the country names in the dropdown had no
 * gap after their flag. Only the form's own text elements are reset.
 */
.etg-tif .form-container h2,
.etg-tif .form-container p,
.etg-tif .form-container label,
.etg-tif .form-container small,
.etg-tif form {
    margin: 0;
    padding: 0;
}

.etg-tif .form-container {
    max-width: 850px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.etg-tif .form-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    padding: 45px 35px;
    text-align: center;
    position: relative;
    color: #fff;
}

.etg-tif .form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: etg-tif-pulse 4s ease-in-out infinite;
}

@keyframes etg-tif-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.8; }
}

.etg-tif .form-header h2 {
    font-size: 2.3em;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    color: #fff;
}

.etg-tif .form-header p {
    font-size: 1.05em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.etg-tif .form-body {
    padding: 50px 40px;
}

.etg-tif .form-notice {
    background: #ffe9e9;
    color: #c0392b;
    padding: 10px 15px;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}

.etg-tif .form-group {
    margin-bottom: 25px;
}

.etg-tif .form-group label {
    display: block;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.etg-tif .form-group label span {
    color: #e67e22;
}

.etg-tif .input-wrapper {
    position: relative;
    width: 100%;
    /* A grid or flex child refuses to go below its content width without
       this, which is what pushes a date field out of its column. */
    min-width: 0;
}

.etg-tif .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 1.1em;
    pointer-events: none;
    line-height: 1;
    /* Low on purpose. An open dropdown from the field above has to paint over
       the icon of the field below it, and both are positioned elements in the
       same stacking context - so whoever has the higher z-index wins,
       regardless of which comes first in the markup. */
    z-index: 2;
}

.etg-tif input[type="text"],
.etg-tif input[type="email"],
.etg-tif input[type="tel"],
.etg-tif input[type="number"],
.etg-tif input[type="date"],
.etg-tif textarea,
.etg-tif select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px 16px 14px 45px;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: #f8f9fa;
    transition: all 0.3s ease;
    line-height: 1.6;
    height: 50px;
}

/*
 * The travel dates are text inputs driven by the shared jQuery UI calendar, so
 * the iOS workarounds the native input[type=date] control needed are gone with
 * it: no intrinsic "mm/dd/yyyy" width to fight, no native picker indicator, and
 * the same box as every other field on the form.
 */
.etg-tif .etg-tif-date {
    cursor: pointer;
}

/*
 * .input-icon centres itself on its wrapper with top:50%. That is the same as
 * centring on the field everywhere except the two date wrappers, which also
 * hold a .error-msg underneath: the wrapper is taller than the field there, so
 * half of it landed 13px below the middle of the input. Every field on the
 * form is 50px tall, so half of that puts these two back in line with the rest.
 */
.etg-tif .date-wrapper .input-icon {
    top: 25px;
}

.etg-tif textarea {
    min-height: 120px;
    resize: vertical;
    padding-left: 16px;
    height: auto;
}

.etg-tif input:focus,
.etg-tif textarea:focus,
.etg-tif select:focus {
    border-color: #e67e22;
    background: #fff;
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.15);
    outline: none;
}

.etg-tif input:focus:invalid,
.etg-tif textarea:focus:invalid,
.etg-tif select:focus:invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

/*
 * One placeholder colour for the whole form.
 *
 * The theme ships `input[type="text"]::-webkit-input-placeholder { color:#000 }`,
 * which outranks a plain `.etg-tif ::placeholder`, so name, email, subject,
 * "how did you hear about us" and promo code drew their placeholder in solid
 * black while phone, nationality and the message box were grey. The grey here
 * is the one the booking widget in select-tours uses for its resting field
 * labels, so the two forms read the same.
 *
 * Each vendor spelling needs its own rule: a browser drops a whole selector
 * list the moment it meets a pseudo element it does not recognise.
 */
.etg-tif .input-wrapper input::placeholder,
.etg-tif .form-group textarea::placeholder,
.etg-tif .ts-control > input::placeholder {
    color: #5f6d7e;
    font-weight: 400;
    opacity: 1;
}

.etg-tif .input-wrapper input::-webkit-input-placeholder,
.etg-tif .form-group textarea::-webkit-input-placeholder,
.etg-tif .ts-control > input::-webkit-input-placeholder {
    color: #5f6d7e;
    font-weight: 400;
    opacity: 1;
}

.etg-tif .input-wrapper input::-moz-placeholder,
.etg-tif .form-group textarea::-moz-placeholder,
.etg-tif .ts-control > input::-moz-placeholder {
    color: #5f6d7e;
    font-weight: 400;
    opacity: 1;
}

/* Nationality is a tom-select, whose closed state is a .ts-control, not a
   placeholder - it needs the same grey to sit level with the rest. */
.etg-tif .ts-wrapper.single .ts-control > .item,
.etg-tif .ts-wrapper .ts-control > input {
    color: #5f6d7e;
}

.etg-tif .ts-wrapper.has-items .ts-control > .item {
    color: #2c3e50;
}

.etg-tif .form-row,
.etg-tif .form-row-3,
.etg-tif .date-range {
    display: grid;
    gap: 20px;
}

.etg-tif .form-row   { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.etg-tif .form-row-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.etg-tif .date-range { grid-template-columns: 1fr 1fr; }

.etg-tif .date-wrapper {
    position: relative;
}

.etg-tif .date-wrapper .error-msg {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 45px;
}

.etg-tif .phone-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 5px;
}

/* ===== Counters ===== */

.etg-tif .counter-group {
    display: grid;
    /*
     * 240px is the width a card needs for its label and its buttons on one
     * row. At the old 200px the grid packed three columns into widths where
     * the longest label could not fit, which is what pushed "(Under 2)" onto
     * a second line. Three across still fits the 850px form; narrower
     * containers now drop to two full-size cards instead of three cramped.
     */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.etg-tif .counter-item {
    background: #f8f9fa;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    /* 15px of side padding left the label 0.8px short of fitting on one line
       in a 3-across desktop column; 12px buys it back. */
    padding: 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;

    /*
     * Safety valve for the one-line label below. If a column is ever too
     * narrow for "Infants (Under 2)" plus the buttons on one row - a narrow
     * theme column, a wider system font - the controls drop to a second row
     * instead of the label breaking or the text spilling out of the card.
     * The grid stretches every card to the tallest, so the three stay equal
     * either way.
     */
    flex-wrap: wrap;
    row-gap: 8px;
}

.etg-tif .counter-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;

    /*
     * The age range is part of the label, not a second line. Without this
     * "(Under 2)" and "(2-11)" wrapped under the word, making the Infants
     * and Children cards two lines tall while Adults stayed one.
     */
    white-space: nowrap;
    min-width: 0;
}

.etg-tif .counter-label small {
    font-size: 12px;
    font-weight: 400;
    color: #7f8c8d;
    margin-left: 3px;
}

.etg-tif .counter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.etg-tif .counter-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: none;
    border-radius: 6px;
    background: #e67e22;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.etg-tif .counter-btn:hover:not(:disabled) {
    background: #d35400;
    transform: scale(1.05);
}

.etg-tif .counter-btn:disabled {
    background: #ddd;
    cursor: not-allowed;
    opacity: 0.5;
}

.etg-tif .counter-value {
    min-width: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.etg-tif .counter-item input[type="number"] {
    display: none !important;
}

.etg-tif .counter-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 5px;
    display: none;
}

.etg-tif .counter-error.show {
    display: block;
}

/* ===== Submit ===== */

.etg-tif .submit-wrapper {
    text-align: center;
    margin-top: 40px;
}

.etg-tif button[type="submit"] {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #fff;
    padding: 16px 50px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.etg-tif button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(230, 126, 34, 0.5);
}

.etg-tif .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: etg-tif-spin 1s linear infinite;
    display: none;
}

@keyframes etg-tif-spin {
    to { transform: rotate(360deg); }
}

.etg-tif button.loading .spinner { display: inline-block; }
.etg-tif button.loading .btn-text { opacity: 0.7; }

.etg-tif button.success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

/* ===== Tom Select (nationality) ===== */

.etg-tif .ts-wrapper.single .ts-control {
    border: 2px solid #e8ecef !important;
    border-radius: 12px !important;
    background: #f8f9fa !important;
    height: 50px !important;
    padding-left: 45px !important;
    padding-right: 35px !important;
    position: relative;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.etg-tif .ts-wrapper.single .ts-control::after {
    content: "\25BE";
    font-size: 14px;
    color: #7f8c8d;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.etg-tif .ts-control {
    border-color: #e8ecef !important;
}

.etg-tif .ts-dropdown {
    z-index: 60 !important;
    border: 2px solid #e8ecef !important;
    border-radius: 12px !important;
    padding: 5px 0 !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.etg-tif .ts-dropdown .option {
    padding: 10px 15px !important;
    font-size: 15px !important;
    color: #2c3e50 !important;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 6px;
}

.etg-tif .ts-dropdown .option:hover {
    background: #f2f6ff !important;
}

.etg-tif .ts-dropdown .active {
    background: #e8f0ff !important;
    color: #1a73e8 !important;
}

.etg-tif .ts-dropdown .no-results {
    padding: 12px 15px !important;
    color: #999 !important;
    font-size: 14px !important;
    text-align: left !important;
    background: #fafafa !important;
    border-radius: 8px !important;
    margin: 5px !important;
}

.etg-tif .ts-dropdown .ts-dropdown-content:focus {
    outline: none !important;
}

.etg-tif .ts-dropdown-content {
    max-height: 200px !important;
    overflow-y: auto !important;
    padding-right: 5px !important;
}

.etg-tif .ts-dropdown,
.etg-tif .ts-dropdown-content {
    overscroll-behavior: contain !important;
}

.etg-tif .ts-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.etg-tif .ts-dropdown-content::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

/* ===== intl-tel-input (phone) ===== */

.etg-tif .iti {
    width: 100%;
}

.etg-tif .iti__country-list {
    /* Was a hard 300px, which is what put a horizontal scrollbar under the
       list when the phone field sits in a narrower column. */
    width: 100%;
    min-width: 270px;
    max-width: 340px;
    overscroll-behavior: contain !important;
    max-height: 250px !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    z-index: 60;
    /* The library sets nowrap on the list, which makes the longest country
       name decide the width and puts a horizontal scrollbar under it. The
       name truncates instead. */
    white-space: normal;
}

/*
 * Breathing room around the flag.
 *
 * These are intl-tel-input's own values, restated rather than inherited,
 * because the page they sit on has reset them before and may again.
 */
.etg-tif .iti__selected-flag {
    padding: 0 8px 0 12px;
}

.etg-tif .iti__selected-dial-code {
    margin-left: 8px;
}

.etg-tif .iti__country {
    padding: 9px 14px;
    display: flex;
    align-items: center;
}

.etg-tif .iti__flag-box {
    margin-right: 0;
}

.etg-tif .iti__country-name {
    margin-left: 10px;
    margin-right: 8px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etg-tif .iti__dial-code {
    margin-left: auto;
    color: #7f8c8d;
}

.etg-tif .iti--separate-dial-code .iti__selected-flag {
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 12px 0 0 12px;
}

/* ===== Responsive ===== */

@media (max-width: 767px) {
    .etg-tif .date-range {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .etg-tif .form-container {
        margin: 24px auto;
        border-radius: 18px;
    }

    .etg-tif .form-header {
        padding: 32px 22px;
    }

    .etg-tif .form-header h2 {
        font-size: 1.7em;
    }

    .etg-tif .form-body {
        padding: 30px 22px;
    }

    .etg-tif button[type="submit"] {
        width: 100%;
        padding: 16px 30px;
    }
}

@media (max-width: 600px) {
    .etg-tif .counter-group {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Layout: image, form and contact block as one arrangement.

   In the snippets these were three separate things dropped into a
   WPBakery row, and the contact block carried `max-width: 1100px;
   margin: 40px auto` - wider than the column it was placed in on the
   home page, so it escaped its column and slid under the form. Here
   they are one grid: nothing can be wider than its own cell.
   ============================================================ */

.etg-tif-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    align-items: start;
    width: 100%;
}

.etg-tif-layout.has-aside {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.etg-tif-layout.has-aside.image-right .etg-tif-aside {
    order: 2;
}

.etg-tif-aside,
.etg-tif-main {
    min-width: 0;
}

.etg-tif-aside {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.etg-tif-media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 16px;
}

/* Inside the layout the card fills its cell instead of centring itself
   in a width it does not have. */
.etg-tif-layout .form-container {
    margin: 0;
    max-width: 100%;
}

/* Contact under the form spans the whole grid, whatever the columns are. */
.etg-tif-layout > .etg-ca {
    grid-column: 1 / -1;
}

@media (max-width: 991px) {
    .etg-tif-layout.has-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .etg-tif-layout.has-aside.image-right .etg-tif-aside {
        order: 0;
    }
}

/* ============================================================
   Contact alternative block

   Redesigned to sit with the rest of the site: the brand orange
   instead of the purple/blue it arrived with, a calm icon chip
   instead of a pulsing circle, and the two methods as cards that
   read as buttons - label above, value below, arrow on the right
   that moves on hover.
   ============================================================ */

.etg-ca {
    --etg-ca-brand: #e67e22;
    --etg-ca-brand-dark: #d35400;
    --etg-ca-ink: #172033;
    --etg-ca-muted: #6b7787;
    --etg-ca-line: #e9eef4;

    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--etg-ca-line);
    border-radius: 18px;
    padding: 30px 32px;
    box-shadow: 0 1px 2px rgba(23, 32, 51, 0.05), 0 12px 30px rgba(23, 32, 51, 0.07);
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.etg-ca.is-standalone {
    max-width: 1100px;
    margin: 40px auto;
}

.etg-ca::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffb375 0%, var(--etg-ca-brand) 55%, var(--etg-ca-brand-dark) 100%);
}

.etg-ca .header-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--etg-ca-line);
    flex-wrap: wrap;
}

/* Tinted surface, coloured glyph - not an outline, which reads as washed
   out against white. */
.etg-ca .alert-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(230, 126, 34, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.etg-ca .alert-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--etg-ca-brand-dark);
}

.etg-ca .header-text {
    flex: 1;
    min-width: 220px;
}

.etg-ca .header-text h2 {
    color: var(--etg-ca-ink);
    font-size: clamp(18px, 1.5vw, 21px);
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.3;
    letter-spacing: -0.1px;
}

.etg-ca .header-text p {
    color: var(--etg-ca-muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.55;
}

.etg-ca .contact-title {
    color: var(--etg-ca-ink);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 14px;
    display: block;
}

.etg-ca .contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.etg-ca .contact-item {
    background: #fff;
    padding: 16px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    border: 1px solid var(--etg-ca-line);
    text-decoration: none;
    min-width: 0;
}

.etg-ca .contact-item:hover,
.etg-ca .contact-item:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.1);
    border-color: #ffc79d;
    outline: none;
}

.etg-ca .contact-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #ffb375 0%, #ff9750 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.etg-ca .contact-icon svg {
    width: 21px;
    height: 21px;
    fill: #53270a;
}

.etg-ca .contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.etg-ca .contact-label {
    color: var(--etg-ca-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    line-height: 1.4;
}

.etg-ca .contact-value {
    color: var(--etg-ca-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    /* A long address wraps inside its card rather than widening it. */
    overflow-wrap: anywhere;
}

.etg-ca .contact-arrow {
    color: #b6c0cc;
    font-size: 17px;
    line-height: 1;
    flex: 0 0 auto;
    transition: color 180ms ease, transform 180ms ease;
}

.etg-ca .contact-item:hover .contact-arrow {
    color: var(--etg-ca-brand-dark);
    transform: translateX(3px);
}

/* Beside the form the block is in a narrow column, so one card per row. */
.etg-tif-aside .etg-ca {
    padding: 24px 20px;
}

.etg-tif-aside .etg-ca .contact-methods {
    grid-template-columns: minmax(0, 1fr);
}

/* The heading runs to three lines in a column this narrow; centring the chip
   against it leaves it floating in the middle of the text. */
.etg-tif-aside .etg-ca .header-section {
    align-items: flex-start;
}

/* Just small enough that the address stays on one line instead of breaking
   in the middle of a word. */
.etg-tif-aside .etg-ca .contact-value {
    font-size: 13.5px;
}

.etg-tif-aside .etg-ca .contact-item {
    padding: 14px 14px;
    gap: 12px;
}

@media (max-width: 992px) {
    .etg-ca {
        padding: 26px 20px;
    }
}

@media (max-width: 600px) {
    .etg-ca .contact-methods {
        grid-template-columns: minmax(0, 1fr);
    }

    .etg-ca .header-text h2 {
        font-size: 18px;
    }

    .etg-ca .header-text p {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etg-ca .contact-item,
    .etg-ca .contact-arrow {
        transition: none;
    }
}

/* =============================================================================
   Travel dates calendar
   -----------------------------------------------------------------------------
   A copy of the calendar skin in select-tours
   (assets/css/etg-tour-customizations.css), so the inquiry form and the tour
   booking widget show the same picker. It is duplicated rather than shared
   because the two are separate plugins and select-tours only loads its
   stylesheet on a single tour page - this form lives elsewhere. Both target
   the one #ui-datepicker-div jQuery UI puts in the document, so on a page that
   somehow had both the rules are identical and it makes no difference which
   one wins. Change one, change the other.
   ========================================================================== */

#ui-datepicker-div {
    width: 306px;
    max-width: calc(100vw - 32px);
    padding: 14px;
    color: #27364a;
    font-family: inherit;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(23, 43, 77, 0.2);
    box-sizing: border-box;
    z-index: 10050 !important;
}

#ui-datepicker-div .ui-datepicker-header {
    position: relative;
    min-height: 38px;
    margin: 0 0 8px;
    padding: 0 42px;
    color: #172033;
    text-align: center;
    background: transparent;
    border: 0;
}

#ui-datepicker-div .ui-datepicker-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 38px;
}

#ui-datepicker-div .ui-datepicker-prev,
#ui-datepicker-div .ui-datepicker-next {
    position: absolute;
    top: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #526176;
    background: #f5f7fa;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

#ui-datepicker-div .ui-datepicker-prev {
    left: 0;
}

#ui-datepicker-div .ui-datepicker-next {
    right: 0;
}

#ui-datepicker-div .ui-datepicker-prev:hover,
#ui-datepicker-div .ui-datepicker-next:hover {
    color: #d95f13;
    background: #fff7f1;
    border-color: #ffc39b;
}

#ui-datepicker-div .ui-datepicker-prev span,
#ui-datepicker-div .ui-datepicker-next span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    font: 600 25px/1 Arial, sans-serif;
    text-indent: 0;
}

#ui-datepicker-div .ui-datepicker-calendar {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
}

#ui-datepicker-div .ui-datepicker-calendar thead,
#ui-datepicker-div .ui-datepicker-calendar tbody,
#ui-datepicker-div .ui-datepicker-calendar tr {
    border: 0;
}

#ui-datepicker-div .ui-datepicker-calendar th {
    height: 28px;
    padding: 0;
    color: #8995a5;
    font-size: 10px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
    text-transform: uppercase;
    background: transparent;
    border: 0;
}

#ui-datepicker-div .ui-datepicker-calendar td {
    padding: 0;
    text-align: center;
    background: transparent;
    border: 0;
}

#ui-datepicker-div .ui-datepicker-calendar td a,
#ui-datepicker-div .ui-datepicker-calendar td span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 34px;
    height: 34px;
    margin: 0 auto;
    padding: 0;
    color: #34445a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 10px;
    box-sizing: border-box;
    transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

#ui-datepicker-div .ui-datepicker-calendar td a:hover {
    color: #d95f13;
    background: #fff2e8;
}

#ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-today a {
    color: #c95710;
    box-shadow: inset 0 0 0 1px #ffb989;
}

#ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-current-day a {
    color: #fff;
    background: #ed741f;
    box-shadow: 0 5px 12px rgba(221, 99, 20, 0.24);
}

#ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-unselectable span {
    color: #c6cdd6;
    opacity: 0.62;
}

#ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-other-month span {
    color: #d5dae1;
}

/* Placement classes set by the booking script. The calendar is positioned in
   viewport coordinates so it stays attached to the field while the sticky
   booking widget travels with the page. */
#ui-datepicker-div.etg-datepicker-beside,
#ui-datepicker-div.etg-datepicker-above {
    box-shadow: 0 22px 54px rgba(23, 43, 77, 0.24);
}

/* Small screens: the calendar is shown as a centred dialog over a backdrop
   rather than squeezed under a field near the bottom of the viewport. */
#ui-datepicker-div.etg-datepicker-modal {
    position: fixed !important;
    top: 50% !important;
    right: 12px !important;
    bottom: auto !important;
    left: 12px !important;
    width: auto !important;
    max-width: 360px;
    margin: 0 auto;
    padding: 14px;
    transform: translateY(-50%);
}

.etg-datepicker-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10040;
    background: rgba(17, 29, 46, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, visibility 160ms ease;
}

.etg-datepicker-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* -----------------------------------------------------------------------------
   Winning the cascade for the calendar
   -----------------------------------------------------------------------------
   Three stylesheets already style #ui-datepicker-div on this site: the theme
   paints the header orange, select-tours' tours.css paints it yellow, and the
   Customizer's Additional CSS hides the header's arrows with `opacity: 0`. All
   three use `#ui-datepicker-div .ui-datepicker-...`, the same specificity as
   the skin above, so whichever loads last wins - and on this page that is not
   us, which is why the header came out orange with the arrows missing and only
   their raw title text showing on hover.

   .etg-modern-tour-datepicker is put on the element by our own beforeShow, so
   naming it here adds the one extra class that settles it for good.
   -------------------------------------------------------------------------- */

#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-header {
    color: #172033;
    background: transparent;
    background-color: transparent;
    border: 0;
}

#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-title {
    color: #172033;
}

#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-header a,
#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-prev,
#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-next {
    color: #526176;
    background: #f5f7fa;
    border: 1px solid #e4e8ee;
    opacity: 1;
}

#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-header a:hover,
#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-prev:hover,
#ui-datepicker-div.etg-modern-tour-datepicker .ui-datepicker-next:hover {
    color: #d95f13;
    background: #fff7f1;
    border-color: #ffc39b;
    opacity: 1;
}

/*
 * jQuery UI leaves its div in the document between uses. It only sets
 * `display` when it opens or closes one, and its own stylesheet - the part
 * that starts it hidden - is not loaded here, only the script. Without this
 * the empty div renders as a 306px white card in the page flow, which the
 * skin above makes very visible indeed.
 */
#ui-datepicker-div {
    display: none;
    position: absolute;
}
