/* Carmo Analytics — cookie banner (<dialog class="carmo-cc">) and the footer button "Cookie settings".
   Port of carmonl style_carmo_consent_modal_20260905b.css. Colours: tokens from stylesheet_ux_0base.css, plus the
   keywords white/black and rgba() for the backdrop and shadow (rule R5: no hex).
   Mobile as on carmonl: the three buttons always on one row (stacked, the Marketing box fell off a 320px screen);
   text and options scroll inside their own strip, never the button row. */

html:has(dialog.carmo-cc[open]) { overflow: hidden; }

.carmo-cc:not([open]) { display: none; }
.carmo-cc[open] {
    display: flex; flex-direction: column;
    width: min(560px, calc(100% - 32px)); max-height: 92vh; box-sizing: border-box;
    margin: auto; padding: 24px 24px 20px; border: 0; border-radius: 10px;
    background: white; color: var(--carmo-text);
    box-shadow: 0 12px 48px rgba(0, 0, 0, .35);
    font-size: var(--carmo-fs-small); line-height: 1.55;
}
.carmo-cc::backdrop { background: rgba(20, 20, 20, .6); }

.carmo-cc__title { margin: 0 0 8px; font-size: 1.25em; font-weight: 700; line-height: 1.3; color: var(--carmo-text); }
.carmo-cc__txt { margin: 0 0 16px; flex: 0 1 auto; max-height: 26vh; overflow-y: auto; overscroll-behavior: contain; }
.carmo-cc__txt a { color: var(--carmo-text); text-decoration: underline; }

.carmo-cc__opts {
    display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px;
    flex: 0 1 auto; max-height: 30vh; overflow-y: auto; overscroll-behavior: contain;
}
.carmo-cc__opt { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.carmo-cc__opt input { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; }
/* wt_styles.css hides every checkbox (input[type="checkbox"] { display: none }) and draws one via input + label:before;
   here the input sits inside its label, so show the native box (more specific selector, no !important needed). */
.carmo-cc .carmo-cc__opt input[type="checkbox"] { display: inline-block; appearance: auto; accent-color: var(--carmo-btn); }
.carmo-cc__lab { display: block; font-weight: 600; }
.carmo-cc__hint { display: block; margin-top: 3px; font-weight: 400; line-height: 1.35; color: var(--carmo-text-2); }

.carmo-cc__btns { display: flex; gap: 10px; flex: 0 0 auto; }
.carmo-cc__btn {
    flex: 1 1 0; min-height: 46px; padding: 10px; border: 2px solid var(--carmo-btn); border-radius: 5px;
    background: white; color: var(--carmo-text); font: inherit; font-weight: 600; text-align: center; cursor: pointer;
}
.carmo-cc__btn:hover, .carmo-cc__btn--accept { background: var(--carmo-btn); color: white; }
.carmo-cc__btn--accept { font-weight: 800; }
.carmo-cc__btn--accept:hover { background: var(--carmo-btn-hover); border-color: var(--carmo-btn-hover); }
.carmo-cc__btn:focus-visible, .carmo-cc__opt input:focus-visible, .carmo-cc__txt a:focus-visible,
.carmo-cc-reopen:focus-visible { outline: 3px solid var(--carmo-text); outline-offset: 2px; }

.carmo-cc-footer { padding: 8px 16px 16px; text-align: center; }
.carmo-cc-reopen {
    padding: 4px 8px; border: 0; background: none; color: var(--carmo-text-2);
    font: inherit; font-size: var(--carmo-fs-small); text-decoration: underline; cursor: pointer;
}

@media (max-width: 767px) {
    .carmo-cc[open] { width: calc(100% - 20px); max-height: 94vh; padding: 16px 14px 14px; border-radius: 8px; line-height: 1.45; }
    .carmo-cc__txt { max-height: 20vh; margin-bottom: 10px; }
    .carmo-cc__opts { max-height: 28vh; gap: 10px; margin-bottom: 12px; }
    .carmo-cc__btns { gap: 6px; }
    .carmo-cc__btn { min-height: 44px; padding: 8px 4px; font-size: 13px; line-height: 1.2; }
}

@media (max-width: 359px) {
    .carmo-cc[open] { max-height: 96vh; padding: 14px 10px 10px; }
    .carmo-cc__txt { max-height: 16vh; }
    .carmo-cc__opts { max-height: 32vh; }
    .carmo-cc__btn { padding: 6px 2px; font-size: 12px; }
}

/* Phone in landscape: very little height. */
@media (max-height: 450px) and (max-width: 900px) {
    .carmo-cc[open] { max-height: 98vh; padding: 10px 10px 8px; }
    .carmo-cc__title { margin-bottom: 4px; font-size: 1.1em; }
    .carmo-cc__txt { max-height: 22vh; margin-bottom: 6px; }
    .carmo-cc__opts { max-height: 30vh; margin-bottom: 8px; }
    .carmo-cc__btn { min-height: 36px; }
}
