/* Abhavij Consent. Local styles; colours and radii follow the BuddyBoss theme variables when present. */
#abhv-consent-root, .abhv-placeholder, .abhv-cookie-list, .abhv-optin {
    --abhv-text: var(--bb-body-text-color, #3b3f42);
    --abhv-heading: var(--bb-headings-color, #363c3f);
    --abhv-muted: #6b7175;
    --abhv-surface: var(--bb-content-background-color, #fff);
    --abhv-soft: var(--bb-content-alternate-background-color, #f9f7f4);
    --abhv-border: var(--bb-content-border-color, #e0ded7);
    --abhv-primary: var(--bb-primary-button-background-regular, #ff6900);
    --abhv-primary-hover: var(--bb-primary-button-background-hover, #ee4d00);
    --abhv-on-primary: var(--bb-primary-button-text-regular, #fff);
    --abhv-radius: var(--bb-block-radius, 10px);
    --abhv-button-radius: var(--bb-button-radius, 7px);
    --abhv-focus: #1c1d30;
}
#abhv-consent-root { font-family: inherit; color: var(--abhv-text); font-size: 15px; line-height: 1.6; }
#abhv-consent-root [hidden], .abhv-placeholder[hidden], .abhv-placeholder [hidden] { display: none !important; }
#abhv-consent-root h2, #abhv-consent-root h3 { color: var(--abhv-heading); font-family: inherit; margin: 0; padding: 0; letter-spacing: 0; text-transform: none; }
#abhv-consent-root h2 { font-size: 18px; line-height: 1.4; font-weight: 600; }
#abhv-consent-root h3 { font-size: 15px; line-height: 1.4; font-weight: 600; }
#abhv-consent-root p { margin: 0; font-size: inherit; }
#abhv-consent-root a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Buttons: accept and reject look the same; "choose" is quieter but the same size. */
#abhv-consent-root .abhv-btn, .abhv-placeholder .abhv-btn {
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer;
    min-height: 44px; padding: 10px 18px; border-radius: var(--abhv-button-radius);
    color: var(--abhv-on-primary); background: var(--abhv-primary); border: 1px solid var(--abhv-primary);
    white-space: normal; text-align: center; box-shadow: none; text-transform: none; letter-spacing: 0; width: auto; height: auto;
}
#abhv-consent-root .abhv-btn:hover, .abhv-placeholder .abhv-btn:hover { background: var(--abhv-primary-hover); border-color: var(--abhv-primary-hover); color: var(--abhv-on-primary); }
#abhv-consent-root .abhv-btn-secondary, .abhv-placeholder .abhv-btn-secondary { color: var(--abhv-heading); background: transparent; border-color: #a9a69d; }
#abhv-consent-root .abhv-btn-secondary:hover, .abhv-placeholder .abhv-btn-secondary:hover { color: var(--abhv-heading); background: transparent; border-color: var(--abhv-heading); }
#abhv-consent-root .abhv-btn-accept { color: #fff; background: #0076f0; border-color: #0076f0; }
#abhv-consent-root .abhv-btn-accept:hover { color: #fff; background: #005fc2; border-color: #005fc2; }
#abhv-consent-root button:focus-visible, #abhv-consent-root a:focus-visible, #abhv-consent-root input:focus-visible, #abhv-consent-root summary:focus-visible,
.abhv-placeholder button:focus-visible, .abhv-settings-button:focus-visible { outline: 3px solid var(--abhv-focus); outline-offset: 2px; }
.abhv-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* First layer: a card at the bottom, never covering the whole page. */
#abhv-consent-root .abhv-banner {
    position: fixed; z-index: 100000; inset-inline: 16px; bottom: 16px; margin-inline: auto; max-width: 760px;
    max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; padding: 20px 22px;
    background: var(--abhv-surface); border: 1px solid var(--abhv-border); border-radius: var(--abhv-radius);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .14); display: grid; gap: 16px; text-align: start;
}
#abhv-consent-root .abhv-banner-body { display: grid; gap: 8px; }
#abhv-consent-root .abhv-banner .abhv-actions .abhv-btn { flex: 1 1 150px; }
#abhv-consent-root .abhv-update, #abhv-consent-root .abhv-gpc { font-size: 14px; color: var(--abhv-heading); background: var(--abhv-soft); border: 1px solid var(--abhv-border); border-radius: 6px; padding: 8px 10px; }

/* Second layer: modal dialog with its own focus handling (native <dialog>). */
#abhv-consent-root .abhv-dialog {
    width: min(640px, calc(100vw - 24px)); max-height: min(86dvh, 820px); padding: 0; margin: auto;
    border: 1px solid var(--abhv-border); border-radius: var(--abhv-radius); background: var(--abhv-surface); color: var(--abhv-text);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2); overflow: hidden; flex-direction: column;
}
#abhv-consent-root .abhv-dialog[open] { display: flex; }
#abhv-consent-root .abhv-dialog::backdrop { background: rgba(20, 22, 24, .45); }
#abhv-consent-root .abhv-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--abhv-border); }
#abhv-consent-root .abhv-close { font: inherit; font-size: 26px; line-height: 1; cursor: pointer; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: var(--abhv-button-radius); background: transparent; color: var(--abhv-heading); }
#abhv-consent-root .abhv-close:hover { background: var(--abhv-soft); }
#abhv-consent-root .abhv-dialog-body { padding: 16px 20px; overflow: auto; display: grid; gap: 14px; }
#abhv-consent-root .abhv-dialog-actions { padding: 14px 20px; border-top: 1px solid var(--abhv-border); background: var(--abhv-surface); }
#abhv-consent-root .abhv-dialog-actions .abhv-btn { flex: 1 1 140px; }
#abhv-consent-root .abhv-group { border: 1px solid var(--abhv-border); border-radius: 8px; padding: 14px; display: grid; gap: 8px; }
#abhv-consent-root .abhv-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#abhv-consent-root .abhv-always { font-size: 13px; font-weight: 600; color: var(--abhv-muted); }
#abhv-consent-root .abhv-services { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
#abhv-consent-root .abhv-service { margin: 0; padding: 10px 0 0; border-top: 1px solid var(--abhv-border); }
#abhv-consent-root .abhv-small { font-size: 13px; }
#abhv-consent-root .abhv-muted { color: var(--abhv-muted); }
#abhv-consent-root .abhv-details summary { cursor: pointer; font-size: 13px; font-weight: 400; color: var(--abhv-muted); }
#abhv-consent-root .abhv-list { margin: 8px 0 0; padding-inline-start: 18px; font-size: 13px; display: grid; gap: 6px; }
#abhv-consent-root .abhv-status:empty { display: none; }
#abhv-consent-root .abhv-status { font-weight: 600; color: var(--abhv-heading); }

/* Switches: real checkboxes with role="switch", restyled; the theme's checkbox styles are reset. */
#abhv-consent-root .abhv-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-size: 14px; }
#abhv-consent-root .abhv-switch input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto; width: 42px; height: 24px; margin: 0;
    border-radius: 12px; background: #c9c6bd; border: 0; cursor: pointer; opacity: 1; box-shadow: none; transition: background-color .15s;
}
#abhv-consent-root .abhv-switch input[type="checkbox"]::before {
    content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: inset-inline-start .15s; border: 0; transform: none;
}
#abhv-consent-root .abhv-switch input[type="checkbox"]::after { display: none; content: none; }
#abhv-consent-root .abhv-switch input[type="checkbox"]:checked { background: var(--abhv-primary); }
#abhv-consent-root .abhv-switch input[type="checkbox"]:checked::before { inset-inline-start: 21px; }
#abhv-consent-root .abhv-switch input[type="checkbox"]:indeterminate { background: #e9a777; }
#abhv-consent-root .abhv-switch input[type="checkbox"]:indeterminate::before { inset-inline-start: 12px; }

/* Always-reachable settings button and the notice after a change. */
#abhv-consent-root .abhv-manage {
    position: fixed; z-index: 99990; bottom: 16px; inset-inline-start: 16px; width: 40px; height: 40px; min-height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    color: var(--abhv-heading); background: var(--abhv-surface); border: 1px solid var(--abhv-border); border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
#abhv-consent-root .abhv-manage:hover { background: var(--abhv-soft); }
#abhv-consent-root .abhv-notice {
    position: fixed; z-index: 100001; inset-inline: 16px; bottom: 16px; margin-inline: auto; max-width: 560px; box-sizing: border-box;
    padding: 16px 18px; background: var(--abhv-surface); border: 1px solid var(--abhv-border); border-radius: var(--abhv-radius);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .16); display: grid; gap: 12px;
}
html.abhv-banner-open #abhv-consent-root .abhv-notice { bottom: auto; top: 16px; }
#abhv-consent-root .abhv-noscript { position: fixed; z-index: 100000; inset-inline: 0; bottom: 0; margin: 0; padding: 8px 16px; font-size: 13px; text-align: center; background: var(--abhv-soft); border-top: 1px solid var(--abhv-border); }

/* Placeholders for held maps, videos and other content. */
.abhv-placeholder {
    box-sizing: border-box; width: 100%; min-height: 180px; margin: 0 0 1em; padding: 24px 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
    font-size: 14px; line-height: 1.6; color: var(--abhv-text); background: var(--abhv-soft);
    border: 1px solid var(--abhv-border); border-radius: var(--abhv-radius);
}
.abhv-placeholder .abhv-ph-text { margin: 0; max-width: 540px; color: var(--abhv-heading); }
.abhv-placeholder .abhv-ph-note { margin: 0; max-width: 540px; font-size: 13px; color: var(--abhv-muted); }
.abhv-placeholder .abhv-ph-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.abhv-placeholder.abhv-notice-inline { min-height: 0; padding: 16px; }
.geodir-lazyload-div { display: flex; align-items: center; align-content: center; justify-content: center; padding: 12px; box-sizing: border-box; }
.geodir-lazyload-div.row > .abhv-map-placeholder { width: auto; max-width: min(520px, 100%); padding: 18px; }
/* GeoDirectory darkens the map area with an overlay pseudo-element; the notice sits above it. */
.geodir-lazyload-div .abhv-map-placeholder { position: relative; z-index: 1; min-height: 0; max-width: 520px; margin: auto; background: rgba(255, 255, 255, .96); box-shadow: 0 2px 12px rgba(0, 0, 0, .12); cursor: default; }
/* "Remember my recent location searches" under the location switcher's search field. */
.abhv-optin { margin: 6px 0 2px; text-align: start; font-size: 13px; line-height: 1.5; color: var(--abhv-text); }
.abhv-optin .abhv-optin-label { display: inline-flex; align-items: flex-start; gap: 8px; margin: 0; cursor: pointer; font-size: 13px; font-weight: 400; color: var(--abhv-heading); }
.abhv-optin .abhv-optin-label input[type="checkbox"] {
    appearance: auto; -webkit-appearance: checkbox; position: static; opacity: 1; float: none;
    width: 16px; height: 16px; min-width: 16px; margin: 2px 0 0; accent-color: var(--abhv-primary); cursor: pointer;
}
.abhv-optin .abhv-optin-note { margin: 2px 0 0; padding-inline-start: 24px; font-size: 12px; color: var(--abhv-muted); }
.abhv-blocked-image { background: var(--bb-content-alternate-background-color, #f4f2ee); }
.abhv-settings-button { font: inherit; cursor: pointer; }
.abhv-cookie-list table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 14px; }
.abhv-cookie-list th, .abhv-cookie-list td { text-align: start; vertical-align: top; padding: 8px; border: 1px solid var(--abhv-border); }

@media (max-width: 600px) {
    #abhv-consent-root .abhv-banner { inset-inline: 10px; bottom: 10px; padding: 14px; gap: 12px; max-height: calc(100dvh - 20px); font-size: 14px; line-height: 1.55; }
    #abhv-consent-root .abhv-banner h2 { font-size: 16px; }
    #abhv-consent-root .abhv-banner .abhv-actions .abhv-btn { flex: 1 1 40%; }
    #abhv-consent-root .abhv-banner [data-abhv-action="customize"], #abhv-consent-root .abhv-dialog-actions .abhv-btn { flex-basis: 100%; }
    #abhv-consent-root .abhv-dialog { width: calc(100vw - 16px); max-height: 92dvh; }
    #abhv-consent-root .abhv-dialog-body, #abhv-consent-root .abhv-dialog-head, #abhv-consent-root .abhv-dialog-actions { padding-inline: 14px; }
    #abhv-consent-root .abhv-manage { bottom: 10px; inset-inline-start: 10px; }
}
@media (prefers-reduced-motion: reduce) { #abhv-consent-root * { transition: none !important; } }
@media print { #abhv-consent-root { display: none !important; } }
