/* Cookie consent banner and settings panel (app/consent.php, assets/js/consent.js).
   Self-contained: it also runs on the legacy Bootstrap pages and the UAE quote page, which do not load och.css, so
   every och token has its value as a fallback and every rule is namespaced .och-cc-*.
   Accept, Reject and Choose are the same button on purpose (equal weight, no orange): see och/DESIGN.md "Cookie consent". */
.och-cc[hidden],
.och-cc [hidden] { display: none !important; }

.och-cc {
    --cc-ink: var(--och-ink, #14171C);
    --cc-text: var(--och-text, #353A43);
    --cc-line: var(--och-line, #E8EAED);
    --cc-line-strong: var(--och-line-strong, #D9DCE1);
    --cc-tint: var(--och-gray-50, #F7F8FA);
    --cc-link: var(--och-link, #0E6E8C);
    --cc-radius: var(--och-r-sm, 8px);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cc-text);
    text-align: start;
}
.och-cc *, .och-cc *::before, .och-cc *::after { box-sizing: border-box; }

.och-cc-bar {
    position: fixed;
    inset-inline: 0;
    bottom: var(--och-cc-offset, 0px);
    z-index: 10050;   /* above the legacy WhatsApp bubble (9999) and the mobile bars; below the page loader */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px 32px;
    padding: 14px max(16px, calc((100vw - 1200px) / 2)) calc(14px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--cc-line-strong);
    box-shadow: 0 -6px 24px rgba(20, 23, 28, 0.10);
}
.och-cc-copy { flex: 1 1 auto; min-width: 0; max-width: 760px; }
.och-cc .och-cc-title {
    margin: 0 0 2px;
    padding: 0;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cc-ink);
    letter-spacing: 0;
    text-transform: none;
}
.och-cc p { margin: 0; padding: 0; font-size: 14px; line-height: 1.5; color: var(--cc-text); }
.och-cc a { color: var(--cc-link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.och-cc a:hover { color: var(--och-link-hover, #0B5A73); }

.och-cc-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.och-cc .och-cc-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 8px 16px;
    border: 1.5px solid var(--cc-ink);
    border-radius: var(--cc-radius);
    background: #fff;
    color: var(--cc-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    white-space: normal;
    cursor: pointer;
    box-shadow: none;
}
.och-cc .och-cc-btn:hover { background: var(--cc-tint); color: var(--cc-ink); }
.och-cc .och-cc-btn:active { background: var(--cc-line); }
.och-cc button:focus-visible,
.och-cc a:focus-visible,
.och-cc input:focus-visible { outline: 2px solid var(--cc-link); outline-offset: 2px; }
.och-cc .och-cc-title:focus { outline: none; }

/* Settings panel */
.och-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 23, 28, 0.55);
    overflow-y: auto;
}
.och-cc-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    overflow-y: auto;
    padding: 24px;
    background: #fff;
    border-radius: var(--och-r-lg, 12px);
    box-shadow: 0 16px 48px rgba(20, 23, 28, 0.24);
}
.och-cc-panel > .och-cc-title { font-size: 20px; margin: 0 0 6px; padding-inline-end: 44px; }
.och-cc .och-cc-x {
    appearance: none;
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--cc-radius);
    background: transparent;
    color: var(--cc-ink);
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.och-cc .och-cc-x:hover { background: var(--cc-tint); }
.och-cc .och-cc-cats { list-style: none; margin: 16px 0; padding: 0; border-top: 1px solid var(--cc-line); }
.och-cc .och-cc-cat { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--cc-line); list-style: none; }
.och-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; margin-bottom: 2px; }
.och-cc .och-cc-cat-name { margin: 0; font-size: 15px; font-weight: 700; color: var(--cc-ink); cursor: default; }
.och-cc label.och-cc-cat-name { cursor: pointer; }
.och-cc .och-cc-on { font-size: 13px; font-weight: 600; color: var(--och-text-2, #5E6470); white-space: nowrap; }
.och-cc input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--cc-link);
    cursor: pointer;
    opacity: 1;
    position: static;
}
.och-cc-panel .och-cc-actions .och-cc-btn { flex: 1 1 150px; }

html.och-cc-modal { overflow: hidden; }

/* The page's own floating buttons move up while the banner is showing, instead of hiding under it. */
html.och-cc-on .whatsapp_contact { bottom: calc(var(--och-cc-h, 0px) + 22px) !important; }
html.och-cc-on .progress-wrap { bottom: calc(var(--och-cc-h, 0px) + 16px) !important; }

@media (max-width: 899px) {
    .och-cc-bar { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; }
    .och-cc-copy { max-width: none; }
    .och-cc-bar .och-cc-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .och-cc-bar .och-cc-actions .och-cc-btn:last-child { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
    .och-cc p { font-size: 13px; }
    .och-cc-panel { padding: 20px 16px; }
}
@media print {
    .och-cc { display: none !important; }
}

/* "Cookie settings" in the och footer's small print (dark band): reads as a link. */
.och-foot-cookies { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.och-foot-cookies:hover { color: #fff; }
