/*
 * The confirmation window, on the two surfaces that carry it. It borrows the
 * tokens of the product rather than naming a colour: a salon that changed its
 * palette must not meet one window that stayed blue.
 */
.oubkw-confirm .oubkw-confirm-icon {
    font-size: 2rem;
    color: var(--oubkw-error, #B91C1C);
}

.oubkw-confirm .modal-content {
    border: 0;
    border-radius: 14px;
}

/*
 * In the staff shell the card follows the shell theme, its text inheriting the
 * shell colour: not every route loads the diary sheet, which gives .oubkw-modal
 * its background.
 */
.oubkw-app .oubkw-confirm .modal-content {
    background-color: var(--oubkw-adm-surface);
}

.oubkw-confirm [data-oubkw-confirm-message] {
    white-space: pre-line;
}

/*
 * Asked from the booking widget, the window is a theme root
 * (OUBKW_Public::THEME_ROOT_SELECTORS): its card, its text and its muted
 * message follow the widget in light and dark. The utility class of Bootstrap
 * carries !important, hence the one here.
 */
.oubkw-confirm-themed .modal-content {
    background-color: var(--oubkw-surface-1);
    color: var(--oubkw-text);
}

.oubkw-confirm-themed [data-oubkw-confirm-message].text-muted {
    color: var(--oubkw-text-mid) !important;
}

/*
 * Above the document viewer (oubkw-doc-viewer.css), which asks through this
 * window: under it, the question went unseen and its yes could not be given.
 */
.oubkw-confirm.modal {
    z-index: 100070;
}

body:has(.oubkw-confirm.show) > .modal-backdrop {
    z-index: 100060;
}

/* The plain path, used only where Bootstrap is absent. */
.oubkw-confirm.show {
    background: rgba(0, 0, 0, .45);
}

body.oubkw-confirm-open {
    overflow: hidden;
}

/*
 * The quantity asked inside the question. Centred and wide enough for three
 * digits, and dressed from the tokens so it holds up on a surface where
 * Bootstrap is absent.
 */
.oubkw-confirm [data-oubkw-confirm-number][hidden] {
    display: none;
}

.oubkw-confirm [data-oubkw-confirm-number-label] {
    display: block;
    margin-bottom: 6px;
    color: var(--oubkw-text, #2C1F14);
}

.oubkw-confirm [data-oubkw-confirm-number-input] {
    display: block;
    width: 7rem;
    margin: 0 auto;
    padding: 8px 10px;
    font-size: 1.05rem;
    text-align: center;
    color: var(--oubkw-text, #2C1F14);
    background: var(--oubkw-surface, #FFFFFF);
    border: 1px solid var(--oubkw-border, #D8CFC4);
    border-radius: 8px;
}

/* Whom and what the question is about (T112): the name, the amount, a muted chip. */
.oubkw-confirm [data-oubkw-confirm-ident][hidden] {
    display: none;
}

.oubkw-confirm .oubkw-confirm-ident {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.2rem;
    align-items: center;
    padding: .6rem .8rem;
    font-size: .88rem;
    text-align: left;
    color: var(--oubkw-text, #2C1F14);
    background: var(--oubkw-surface-2, #F6F2EC);
    border: 1px solid var(--oubkw-border, #D8CFC4);
    border-radius: 10px;
}

.oubkw-confirm .oubkw-confirm-chip {
    display: inline-block;
    padding: 1px 9px;
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--oubkw-text-muted, #6B5D50);
    background: var(--oubkw-surface, #FFFFFF);
    border-radius: 999px;
}

/* The date asked inside the question (T112). */
.oubkw-confirm .oubkw-confirm-day {
    max-width: 240px;
}

/* The amount asked under an option (T134). */
.oubkw-confirm .oubkw-confirm-amount {
    max-width: 140px;
}

/* A choice between two ways forward: the salon colour on the yes, the warning one on the icon. */
.oubkw-confirm.oubkw-confirm--main .oubkw-confirm-icon {
    color: var(--oubkw-warning, #B45309);
}

.oubkw-confirm.oubkw-confirm--main [data-oubkw-confirm-message] {
    text-align: justify;
}

.oubkw-confirm .oubkw-confirm-main {
    background: var(--oubkw-primary, #8B5E3C);
    border-color: var(--oubkw-primary-ui, #8B5E3C);
    color: var(--oubkw-on-primary, #FFFFFF);
}

.oubkw-confirm .oubkw-confirm-main:hover {
    background: var(--oubkw-primary-dark, #6F4A2F);
    color: var(--oubkw-on-primary-dark, #FFFFFF);
}

/* A question read as a paragraph (T1, T2): justified, its icon in the warning colour. */
.oubkw-confirm.oubkw-confirm--justify [data-oubkw-confirm-message] {
    text-align: justify;
}
.oubkw-confirm.oubkw-confirm--justify .oubkw-confirm-icon {
    color: var(--oubkw-warning, #B45309);
}
/* Lines to choose from (a name already known), each with its button. */
.oubkw-confirm [data-oubkw-confirm-picks][hidden] {
    display: none;
}
.oubkw-confirm .oubkw-confirm-picks {
    text-align: left;
}
.oubkw-confirm .oubkw-confirm-pick {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .8rem;
    align-items: center;
    padding: .6rem 0;
    border-bottom: 1px solid var(--oubkw-border, #D8CFC4);
}
.oubkw-confirm .oubkw-confirm-pick:last-child {
    border-bottom: 0;
}
.oubkw-confirm .oubkw-confirm-pick-text {
    flex: 1 1 220px;
    min-width: 0;
    color: var(--oubkw-text, #2C1F14);
}
.oubkw-confirm .oubkw-confirm-pick-detail {
    font-size: .82rem;
    color: var(--oubkw-text-muted, #6B5B4E);
}
.oubkw-confirm .oubkw-confirm-pick-none {
    font-style: italic;
}
/* The lines a question is about (new imported prices), in the wide window. */
.oubkw-confirm.oubkw-confirm--wide .modal-dialog {
    max-width: 640px;
}

.oubkw-confirm [data-oubkw-confirm-table][hidden] {
    display: none;
}

.oubkw-confirm .oubkw-confirm-table {
    width: 100%;
    font-size: .85rem;
    text-align: left;
    color: var(--oubkw-text, #2C1F14);
}

.oubkw-confirm .oubkw-confirm-table th,
.oubkw-confirm .oubkw-confirm-table td {
    padding: .45rem .5rem;
    border-bottom: 1px solid var(--oubkw-border, #D8CFC4);
    vertical-align: top;
}

.oubkw-confirm .oubkw-confirm-table th {
    color: var(--oubkw-text-muted, #6B5B4E);
    font-weight: 600;
    font-size: .78rem;
}

/* On a phone each line stands on its own, its cells one under the other. */
@media (max-width: 575.98px) {
    .oubkw-confirm .oubkw-confirm-table thead {
        display: none;
    }

    .oubkw-confirm .oubkw-confirm-table tr {
        display: block;
        padding: .4rem 0;
        border-bottom: 1px solid var(--oubkw-border, #D8CFC4);
    }

    .oubkw-confirm .oubkw-confirm-table td {
        display: block;
        padding: .1rem .2rem;
        border: 0;
    }
}
