/* Supersonique Cookie - front-end banner & preferences modal */

.sc-root { --sc-shadow: 0 18px 50px rgba(15, 23, 42, .22); }

.sc-root *,
.sc-root *::before,
.sc-root *::after { box-sizing: border-box; }

.sc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

/* Banner ---------------------------------------------------------------- */
.sc-banner {
    position: fixed;
    z-index: 99999;
    background: var(--sc-bg, #fff);
    color: var(--sc-text, #111827);
    border-radius: var(--sc-radius, 14px);
    box-shadow: var(--sc-shadow);
    padding: 22px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    animation: sc-rise .35s cubic-bezier(.16, 1, .3, 1) both;
}

.sc-banner.sc-layout-box {
    width: 380px;
    max-width: calc(100vw - 32px);
    /* Default placement. Guarantees the box is on-screen even if the saved
       position is unset or mismatched with the layout (e.g. a bar position). */
    left: var(--sc-offset, 24px);
    right: auto;
    bottom: var(--sc-offset, 24px);
}
.sc-banner.sc-layout-box.sc-pos-bottom-right {
    left: auto;
    right: var(--sc-offset, 24px);
}
/* Generic hooks kept for backward compatibility. */
.sc-pos-bottom-left  { left: var(--sc-offset, 24px); bottom: var(--sc-offset, 24px); }
.sc-pos-bottom-right { right: var(--sc-offset, 24px); bottom: var(--sc-offset, 24px); }

.sc-banner.sc-layout-bar {
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--sc-offset, 24px);
    width: min(1080px, calc(100vw - 40px));
    display: grid;
    grid-template-columns: 1fr auto;
    grid-gap: 16px;
    align-items: center;
}
.sc-banner.sc-layout-bar .sc-banner__actions { margin-top: 0; }
.sc-pos-top.sc-layout-bar { top: var(--sc-offset, 24px); bottom: auto; }

.sc-banner.sc-layout-modal {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 440px;
    max-width: calc(100vw - 32px);
}

.sc-logo { display: block; height: 24px; width: auto; margin-bottom: 14px; }

.sc-banner__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.sc-banner__message { margin: 0; opacity: .82; }

.sc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.sc-banner.sc-layout-bar .sc-banner__message { display: inline; }

/* Buttons --------------------------------------------------------------- */
/* Selectors are scoped under #sc-root (ID specificity) so theme button
   resets — e.g. Hello Elementor's [type=button]/[type=submit] rules, which
   tie a plain class on specificity — cannot override them regardless of load
   order. */
#sc-root .sc-btn {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    width: auto;
    min-height: 0;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    background: transparent;
    color: var(--sc-accent, #4f46e5);
    border: 1.5px solid var(--sc-accent, #4f46e5);
    border-radius: calc(var(--sc-radius, 14px) * .6);
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}
#sc-root .sc-btn:hover { transform: translateY(-1px); }
#sc-root .sc-btn:active { transform: translateY(0); }
#sc-root .sc-btn--primary { background: var(--sc-accent, #4f46e5); color: var(--sc-btn-text, #fff); }
#sc-root .sc-btn--primary:hover { filter: brightness(1.06); }
#sc-root .sc-btn--ghost { background: transparent; color: var(--sc-accent, #4f46e5); }
#sc-root .sc-btn--ghost:hover { background: color-mix(in srgb, var(--sc-accent, #4f46e5) 10%, transparent); }

/* Modal ----------------------------------------------------------------- */
.sc-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.sc-modal[hidden] { display: none; }
.sc-modal__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }

.sc-modal__dialog {
    position: relative;
    width: 560px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--sc-bg, #fff);
    color: var(--sc-text, #111827);
    border-radius: var(--sc-radius, 14px);
    box-shadow: var(--sc-shadow);
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: sc-rise .3s cubic-bezier(.16, 1, .3, 1) both;
}
.sc-modal__head { display: flex; align-items: center; justify-content: space-between; }
.sc-modal__head .sc-logo { margin-bottom: 0; }
#sc-root .sc-modal__close { background: none; border: 0; border-radius: 0; padding: 0; font-size: 26px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; box-shadow: none; }
#sc-root .sc-modal__close:hover { opacity: 1; }
.sc-modal__title { margin: 16px 0 8px; font-size: 20px; font-weight: 700; }

.sc-cat { padding: 16px 0; border-top: 1px solid rgba(15, 23, 42, .08); }
.sc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-cat__name { font-weight: 600; font-size: 15px; }
.sc-cat__desc { margin: 8px 0 0; font-size: 13px; opacity: .72; line-height: 1.5; }
.sc-cat__badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sc-accent, #4f46e5);
    background: color-mix(in srgb, var(--sc-accent, #4f46e5) 12%, transparent);
    padding: 3px 9px;
    border-radius: 999px;
}

.sc-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

/* Switch ---------------------------------------------------------------- */
.sc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.sc-switch input { opacity: 0; width: 0; height: 0; }
.sc-switch__slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #cbd5e1; border-radius: 999px; transition: background .2s ease;
}
.sc-switch__slider::before {
    content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.sc-switch input:checked + .sc-switch__slider { background: var(--sc-accent, #4f46e5); }
.sc-switch input:checked + .sc-switch__slider::before { transform: translateX(20px); }
.sc-switch input:disabled + .sc-switch__slider { opacity: .55; cursor: not-allowed; }

/* Floating button + link button ---------------------------------------- */
#sc-root .sc-fab {
    position: fixed; left: 20px; bottom: 20px; z-index: 99990;
    width: 46px; height: 46px; border-radius: 50%;
    border: 0; padding: 0; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background: var(--sc-accent, #4f46e5); color: var(--sc-btn-text, #fff);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--sc-shadow); transition: transform .12s ease;
}
#sc-root .sc-fab:hover { transform: translateY(-2px) scale(1.03); }
/* The shortcode/block button renders inside page content (outside #sc-root),
   so it is strengthened with the element+class selector to outrank theme
   [type=button] resets. */
button.sc-link-button {
    -webkit-appearance: none; appearance: none;
    background: none; border: 0; border-radius: 0; padding: 0; cursor: pointer;
    color: inherit; text-decoration: underline; font: inherit;
    box-shadow: none; width: auto; min-height: 0;
}

@keyframes sc-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; } }
.sc-banner.sc-layout-bar { animation-name: sc-fade; }
.sc-banner.sc-layout-modal { animation-name: sc-fade; }
@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
    .sc-banner.sc-layout-box { width: calc(100vw - 24px); left: 12px; right: 12px; bottom: 12px; }
    .sc-banner.sc-layout-bar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-banner, .sc-modal__dialog { animation: none; }
}
