﻿input[type=date], input[type=time] {
    -webkit-min-logical-width: calc(100% - 16px);
}

.the-radio-group--tiles {
    flex: 1;
}

/* the framework lays the shell's command bar out as one right-aligned row that cannot wrap, and the bar
   clips what does not fit. right-aligned overflow spills off the *left* edge, so on a phone the first
   commands - Back to Bookings and Save - end up outside the screen with nothing to scroll them back.
   ButtonBar is excluded: it builds the same markup but decides for itself, through its Wrap parameter,
   whether a second line is wanted */
.the-command-bar .the-command-bar__buttons:not(.button-bar__buttons) {
    flex-wrap: wrap;
}

/* the framework sizes a page's own title bar as a grid whose title column keeps the title's full
   one-line width, leaving the commands beside it whatever is left. a long title - a booking's, with
   its premises address - leaves less than one button, and the buttons are clipped at their start.
   here the commands keep their own width, and go onto a line of their own when both cannot fit */
.the-title-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.the-title-bar > .the-command-bar {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

/* Routes overrides every exception panel's text, and the framework repeats the override as its detail */
.the-notification-view--error .the-notification-view__details {
    display: none;
}

.page-failure {
    display: flex;
    flex-direction: column;
    gap: var(--the-unit-1x);
}

.page-failure__reference {
    color: var(--the-hue-neutral-5);
}

/* the service is chosen in two steps, the second only for a service sold at several lengths. the pair
   is held apart from the fields around it and stays tight within itself, so the length box reads as
   belonging to the service above it */
.service-choice {
    margin-block: var(--the-unit-4x);
}

/* a field that has appeared and holds no answer yet. the ring is drawn outside the box, since the box
   chromes draw their own focus ring inset */
.awaiting-answer {
    box-shadow: 0 0 0 2px var(--the-hue-action-3);
}

/* the shell caps its own height only for a top-level page that asks; a modal sets the same flag and
   nothing reads it, so the booking form's pickers cap it here instead. without this the shell grows
   past the viewport, the document scrolls, and a picker's buttons go down with it */
#the-responsive-shell:has(.staff-filter),
#the-responsive-shell:has(.service-filter) {
    max-height: 100vh;
    max-height: 100dvh;
}

/* the staff home page places each rostered day against today. the whole-business summary and a staff
   member's own list are separate components, so the pair of classes lives here rather than in either
   one's scoped stylesheet */
.roster-day--past {
    color: var(--the-hue-neutral-4);
}

.roster-day--today {
    font-weight: bold;
}

/* the day board and the reception timeline both mark a staff member booked without a shift, and a
   booking no working shift covers */
.no-shift-badge {
    margin-left: var(--the-unit);
    background: var(--the-hue-warning-1);
    color: var(--the-hue-warning-6);
    border-radius: 999px;
    padding: 0 var(--the-unit-1x);
    font-size: 0.85em;
    font-weight: normal;
    white-space: nowrap;
}

.outside-roster {
    outline: 2px dashed var(--the-hue-warning-3);
    outline-offset: -2px;
}

/* a ButtonBar wears .the-command-bar for its styling, and the shell hides its own inlined command bar
   on the page at desktop width, where the commands are in the title bar instead. that rule must not
   reach a bar the page itself put there */
.the-responsive-shell__page > .the-command-bar.button-bar {
    display: flex;
}

/* a list page's search view takes its height from its container, and scrolls its results within it.
   the layouts wrap every page in .page-body, so that wrapper has to hand its own height down to it */
.page-body:has(> .the-entity-search-view) {
    display: flex;
    flex-direction: column;
}

/* copy.js marks a data-copy button with how its last copy went */
[data-copy-state="copied"]::after {
    content: " \2713";
}

[data-copy-state="failed"]::after {
    content: " failed";
}

/* the served page is drawn before the circuit takes it over, and until then a press on it does nothing.
   its controls take no presses and, past the moment a quick connection would have taken over, read as
   not ready. a form that posts to the server works without the circuit, so it is left alone */
.app-live,
.app-prerendered {
    display: contents;
}

.app-prerendered {
    cursor: progress;
}

.app-prerendered :is(button, input, select, textarea):not(form[method="post"] *) {
    pointer-events: none;
    animation: not-ready 0.2s ease-in 0.8s forwards;
}

@keyframes not-ready {
    to {
        filter: opacity(0.5);
    }
}
