.hc-launcher,
.hc-dialog,
.hc-video-placeholder {
    font-family: "DM-sans", Arial, sans-serif;
    box-sizing: border-box;
}

.hc-launcher {
    position: fixed;
    left: max(20px, env(safe-area-inset-left));
    top: calc(100dvh - max(20px, env(safe-area-inset-bottom)) - 52px);
    z-index: 10000;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid #e2e3f5;
    border-radius: 50%;
    background: #fff;
    color: #3e47f0;
    box-shadow: 0 4px 24px #34386626;
    cursor: pointer;
}

.hc-launcher:hover { background: #f0f0ff; }
.hc-launcher svg { width: 29px; height: 29px; }

.hc-dialog {
    position: fixed;
    /* Anchor to the visible viewport even when an existing page overflows horizontally. */
    inset: calc(100dvh - max(86px, calc(env(safe-area-inset-bottom) + 70px))) auto auto max(20px, env(safe-area-inset-left));
    transform: translateY(-100%);
    width: min(440px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100dvh - 110px);
    margin: 0;
    padding: 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #e2e3f5;
    border-radius: 20px;
    background: #fff;
    color: #34374a;
    box-shadow: 0 12px 60px #25295133;
    text-align: left;
}

.hc-dialog::backdrop { background: #24263e38; }
.hc-dialog:not([open]),
.hc-dialog [hidden],
.hc-video-placeholder[hidden] { display: none !important; }

.hc-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hc-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #6068c7; }
.hc-dialog h2 { margin: 4px 0 16px; font-size: 25px; line-height: 1.2; color: #34374a; text-align: left; }
.hc-dialog p { margin: 0; font-size: 14px !important; line-height: 1.55; color: #646a78; }
.hc-close { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2f2fa; color: #44485e; font-size: 26px; line-height: 1; cursor: pointer; }
.hc-category { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0; border-bottom: 1px solid #ededf5; }
.hc-category label { display: block; margin-bottom: 5px; color: #34374a; font-size: 15px; font-weight: 700; cursor: pointer; }
.hc-state { display: inline-block; margin-top: 7px; color: #4d559f; font-size: 12px; font-weight: 700; }

.hc-switch {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 48px;
    width: 48px;
    height: 28px;
    margin: 0;
    padding: 3px;
    border: 0;
    border-radius: 20px;
    background: #a7abb8;
    cursor: pointer;
    transition: background .15s ease;
}
.hc-switch::before { content: ""; display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform .15s ease; }
.hc-switch:checked { background: #3e47f0; }
.hc-switch:checked::before { transform: translateX(20px); }
.hc-switch:disabled { background: #7c82b6; cursor: not-allowed; }
.hc-dialog .hc-note { margin-top: 16px; font-size: 12px !important; }
.hc-dialog .hc-storage-notice { margin-top: 14px; padding: 10px; border-radius: 8px; background: #fff3e1; color: #6b480f; }
.hc-actions { display: flex; gap: 10px; margin-top: 20px; }
.hc-actions .hc-button { flex: 1; }

.hc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #3e47f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
.hc-button-primary { background: #3e47f0; color: #fff; }
.hc-button-primary:hover { background: #3038c7; }
.hc-button-secondary { background: #fff; color: #3e47f0; }
.hc-button-secondary:hover { background: #f0f0ff; }
.hc-launcher:focus-visible,
.hc-dialog :focus-visible,
.hc-video-placeholder :focus-visible { outline: 3px solid #ffb866; outline-offset: 4px; }

[data-cookie-media] { min-height: 240px; }
.hc-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 240px;
    padding: 22px;
    background: linear-gradient(140deg, #fff3e6, #f3ecf6 50%, #eceeff);
    text-align: center;
    color: #535cc5;
}
.hc-video-placeholder > svg { flex-shrink: 0; width: 32px; height: 32px; }
.hc-video-placeholder .hc-video-title { max-width: 620px; margin: 0; color: #34374a; font-size: 15px !important; font-weight: 700; line-height: 1.4; }
.hc-video-placeholder .hc-video-description { max-width: 420px; margin: 0; color: #646a78; font-size: 13px !important; line-height: 1.5; }
.cookie-video-fallback { padding: 24px; background: #f3f1fa; color: #34374a; }
.hc-footer-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 480px) {
    .hc-dialog { left: 12px; width: calc(100vw - 24px); padding: 20px; }
    .hc-video-placeholder { padding: 18px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .hc-switch, .hc-switch::before { transition: none; }
}
