/* ==========================================================================
   The order-details dialog (front_end.restaurants.partials._order-details):
   how and when the customer wants their order; and the offline notice shown
   in its place when the shop can't take one. Brought in, with the time
   picker's own stylesheet, by front_end.partials._order_modal. The panel, its
   head and the text field are the site's dialog (css/design-system.css).
   ========================================================================== */

.dh-order__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 6px;
}

/* A fieldset, or a field with its label. */
.dh-order__group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.dh-order__label {
    display: block;
    width: auto;
    margin: 0 0 10px;
    padding: 0;
    font: var(--dh-weight-semibold) 15px/1.4 var(--dh-font);
    color: var(--dh-text-primary);
}

/* Why the last attempt was turned down, as the account dialogs say theirs. */
.dh-order__error {
    margin: 0;
    text-align: center;
    font: var(--dh-weight-semibold) 15px/1.4 var(--dh-font);
    color: var(--dh-red-500);
}

/* The Christmas and New Year hours (front_end.partials._final_order_warning). */
.dh-order__notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--dh-red-50);
    border-radius: var(--dh-radius-card);
    font: var(--dh-weight-medium) 14px/1.5 var(--dh-font);
    color: var(--dh-text-primary);
}

.dh-order__notice svg {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--dh-red-500);
}

.dh-order__notice hr {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid var(--dh-border-subtle);
}

/* --------------------------------------------------------------------------
   Delivery or collection: two tiles. The radios stay real, required and
   focusable, laid unseen over their tiles, which show the choice as the
   design marks a selected card: a 2px brand border and the tint.
   -------------------------------------------------------------------------- */

.dh-order__types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dh-order__type {
    position: relative;
    margin: 0;
}

.dh-order__type-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.dh-order__type-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 12px;
    background: var(--dh-surface-card);
    border: 1px solid var(--dh-border-subtle);
    border-radius: var(--dh-radius-button);
    font: var(--dh-weight-bold) 16px/1.2 var(--dh-font);
    color: var(--dh-text-primary);
    transition: background-color var(--dh-duration-fast) var(--dh-ease),
    border-color var(--dh-duration-fast) var(--dh-ease),
    box-shadow var(--dh-duration-fast) var(--dh-ease),
    color var(--dh-duration-fast) var(--dh-ease);
}

.dh-order__type-face svg {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--dh-text-brand);
}

.dh-order__type-input:hover + .dh-order__type-face {
    border-color: var(--dh-red-500);
}

.dh-order__type-input:checked + .dh-order__type-face {
    background: var(--dh-red-50);
    border-color: var(--dh-red-500);
    box-shadow: inset 0 0 0 1px var(--dh-red-500);
    color: var(--dh-red-600);
}

/* A ring for every focus where :focus-visible is unknown; elsewhere, for the
   keyboard only. */
.dh-order__type-input:focus + .dh-order__type-face {
    outline: 2px solid var(--dh-red-500);
    outline-offset: 2px;
}

.dh-order__type-input:focus:not(:focus-visible) + .dh-order__type-face {
    outline: none;
}

/* --------------------------------------------------------------------------
   The time picker (jQuery datetimepicker, css/admin/jquery.datetimepicker.min.css),
   given this class by js/restaurants.js: the brand's type and colours on the
   plugin's own measurements, which its scrolling counts on. !important only
   where the plugin's hover rule has it.
   -------------------------------------------------------------------------- */

.dh-timepicker.xdsoft_datetimepicker {
    border: 1px solid var(--dh-border-subtle);
    border-radius: var(--dh-radius-button);
    box-shadow: var(--dh-shadow-hover);
    font-family: var(--dh-font);
}

.dh-timepicker.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
    border-bottom-color: var(--dh-border-subtle);
}

.dh-timepicker.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div {
    background: var(--dh-surface-card);
    border-top-color: var(--dh-border-subtle);
    font-size: 13px;
    font-weight: var(--dh-weight-semibold);
    color: var(--dh-text-primary);
}

.dh-timepicker.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
    background: var(--dh-red-500);
    box-shadow: none;
    color: var(--dh-ink-0);
}

.dh-timepicker.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
    background: var(--dh-red-50) !important;
    color: var(--dh-red-600) !important;
}

/* --------------------------------------------------------------------------
   The offline notice (front_end.restaurants.partials._offline-restaurant-info-modal).
   -------------------------------------------------------------------------- */

/* A picture the shop may upload with its note, in whatever shape. */
.dh-offline__image {
    display: block;
    max-width: 100%;
    max-height: 220px;
    margin: 4px auto 0;
    border-radius: var(--dh-radius-card);
}

/* The shop's note keeps the line breaks it was written with. */
.dh-offline__message {
    max-width: 40ch;
    margin: 0 auto;
    font: var(--dh-weight-regular) 16px/1.55 var(--dh-font);
    color: var(--dh-text-primary);
    text-align: center;
    white-space: pre-line;
    text-wrap: balance;
}

.dh-offline .dh-btn {
    margin-top: 6px;
}

.dh-offline .dh-btn svg {
    flex: none;
    width: 20px;
    height: 20px;
}
