/* Website forms (booking.js): drop-downs styled like the existing inputs, messages, calendar colours. */

.appointment-form select,
.appointment-dialog-content-form select,
.talk-with-us-form select {
    /* Size, border and font come from the site's own form styles. */
    width: 100%;
    padding-right: 36px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23075b39' stroke-width='1.6'/></svg>") no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    color: #24352d;
    cursor: pointer;
}

/* The callback strip shows an icon on the right of each field; keep the arrow clear of it. */
.appointment-form select {
    background-position: right 38px center;
    padding-right: 56px;
}

.appointment-form select:disabled,
.appointment-dialog-content-form select:disabled,
.talk-with-us-form select:disabled {
    color: #8d9c92;
    cursor: not-allowed;
}

.appointment-form li {
    position: relative;
}

/* The calendar input that replaces the date field */
.flatpickr-input[readonly] {
    cursor: pointer;
    background-color: #fff;
}

.has-error {
    border-color: #d64545 !important;
    box-shadow: 0 0 0 2px rgba(214, 69, 69, .15) !important;
}

.booking-message {
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.booking-message:empty {
    display: none;
}

.booking-message.is-success {
    color: #075b39;
    font-weight: 600;
}

.booking-message.is-error {
    color: #c03030;
}

.btn.is-sending {
    opacity: .6;
    pointer-events: none;
}

.booking-trap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* flatpickr in the site's green */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #075b39;
    border-color: #075b39;
}

.flatpickr-day.today {
    border-color: #a7c85a;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(57, 57, 57, .25);
    text-decoration: line-through;
}

.flatpickr-calendar {
    z-index: 100000 !important;   /* above the homepage popup */
    font-family: "Inter", Arial, sans-serif;
}

/* Appointment forms: no email field (booking.js removes it; this hides it before the script runs) */
.appointment-form li:has(input[type="email"]),
.appointment-dialog-content-form li:has(input[type="email"]),
.talk-with-us-form li:has(input[type="email"]) {
    display: none;
}

/* Date and time in one field */
.booking-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.booking-datetime > input,
.booking-datetime > select {
    width: 100%;
    min-width: 0;
}
.appointment-form .booking-datetime select {
    background-position: right 14px center;
    padding-right: 36px;
}

/* Required fields: red star in the heading, or in the corner of fields that have no heading */
.booking-req {
    color: #d64545;
}
li.is-required {
    position: relative;
}
li.is-required::before {
    content: '*';
    position: absolute;
    top: -2px;
    left: -9px;   /* just outside the field's top-left corner, clear of the text */
    z-index: 2;
    color: #d64545;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* Message box added to appointment forms that had none (callback strip) */
.appointment-form .booking-message-field {
    grid-column: 1 / -1;
}
.appointment-form .booking-message-field textarea {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    font-family: inherit;
}
.appointment-form .booking-message-field textarea {
    border: 1px solid var(--grey, #e5eae4);
    border-radius: 8px;
    padding: 10px 11px;
    background: #fff;
    font-size: 11px;
    color: #59655f;
    box-shadow: var(--shadow, 0 2px 3px rgba(0, 55, 35, .1));
    outline: none;
}
.appointment-form .booking-message-field textarea:focus {
    border-color: var(--green, #075b39);
}
/* The date box has no icon, so it doesn't need the strip's 40px icon space */
.appointment-form .booking-datetime input {
    padding-right: 11px;
}

/* Callback strip: drop-downs sit on the text line by default, which adds a gap below them and
   pushes the centred location icon down. As blocks, the row is exactly as tall as the field. */
.appointment-form select,
.appointment-form input {
    display: block;
}
.appointment-form select,
.booking-datetime > select {
    margin-bottom: 0;
}
