/* SHbyJM Cookie Consent — light theme.
 *
 * Every visual is driven by CSS custom properties so the host site can
 * override them WITHOUT rebuilding this file. Just declare the variables on
 * :root (or any ancestor) in your own stylesheet, e.g.:
 *
 *   :root {
 *     --shbyjm-cc-accent: #c0392b;
 *     --shbyjm-cc-bg: #fff;
 *     --shbyjm-cc-radius: 4px;
 *   }
 */

.shbyjm-cc {
    --shbyjm-cc-bg: #ffffff;
    --shbyjm-cc-fg: #1f2733;
    --shbyjm-cc-muted: #5a6b7b;
    --shbyjm-cc-accent: #1d6fb8;
    --shbyjm-cc-accent-fg: #ffffff;
    --shbyjm-cc-border: #e2e8f0;
    --shbyjm-cc-radius: 8px;
    --shbyjm-cc-shadow: 0 6px 28px rgba(15, 23, 42, .18);
    --shbyjm-cc-z: 2147483000;
    --shbyjm-cc-font: inherit;

    font-family: var(--shbyjm-cc-font);
    color: var(--shbyjm-cc-fg);
    line-height: 1.45;
    box-sizing: border-box;
}

.shbyjm-cc *,
.shbyjm-cc *::before,
.shbyjm-cc *::after { box-sizing: inherit; }

.shbyjm-cc[hidden],
.shbyjm-cc [hidden] { display: none !important; }

/* ---------- banner ---------- */

.shbyjm-cc__banner {
    position: fixed;
    z-index: var(--shbyjm-cc-z);
    background: var(--shbyjm-cc-bg);
    color: var(--shbyjm-cc-fg);
    border: 1px solid var(--shbyjm-cc-border);
    box-shadow: var(--shbyjm-cc-shadow);
    padding: 18px 22px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.shbyjm-cc--bottom-bar .shbyjm-cc__banner {
    left: 0; right: 0; bottom: 0;
    border-width: 1px 0 0 0;
    justify-content: space-between;
}

.shbyjm-cc--bottom-left .shbyjm-cc__banner {
    left: 20px; bottom: 20px;
    max-width: 420px;
    border-radius: var(--shbyjm-cc-radius);
    flex-direction: column;
    align-items: stretch;
}

.shbyjm-cc--center-modal .shbyjm-cc__banner {
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    max-width: 560px;
    width: calc(100% - 40px);
    border-radius: var(--shbyjm-cc-radius);
    flex-direction: column;
    align-items: stretch;
}

.shbyjm-cc__text { flex: 1 1 320px; min-width: 0; }
.shbyjm-cc__title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.shbyjm-cc__body { margin: 0; font-size: .9rem; color: var(--shbyjm-cc-muted); }
.shbyjm-cc__policy { color: var(--shbyjm-cc-accent); text-decoration: underline; }

.shbyjm-cc__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.shbyjm-cc__btn {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--shbyjm-cc-radius);
    border: 1px solid var(--shbyjm-cc-border);
    background: transparent;
    color: var(--shbyjm-cc-fg);
}

.shbyjm-cc__btn--primary {
    background: var(--shbyjm-cc-accent);
    border-color: var(--shbyjm-cc-accent);
    color: var(--shbyjm-cc-accent-fg);
}

.shbyjm-cc__btn:focus-visible {
    outline: 2px solid var(--shbyjm-cc-accent);
    outline-offset: 2px;
}

/* ---------- preferences panel ---------- */

.shbyjm-cc__panel {
    position: fixed;
    inset: 0;
    z-index: calc(var(--shbyjm-cc-z) + 1);
    background: rgba(15, 23, 42, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shbyjm-cc__panel-inner {
    background: var(--shbyjm-cc-bg);
    color: var(--shbyjm-cc-fg);
    border-radius: var(--shbyjm-cc-radius);
    box-shadow: var(--shbyjm-cc-shadow);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    padding: 24px;
}

.shbyjm-cc__intro { margin: 0 0 16px; font-size: .9rem; color: var(--shbyjm-cc-muted); }
.shbyjm-cc__cats { list-style: none; margin: 0 0 18px; padding: 0; }

.shbyjm-cc__cat {
    border-top: 1px solid var(--shbyjm-cc-border);
    padding: 14px 0;
}

.shbyjm-cc__cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.shbyjm-cc__cat-head input { width: 18px; height: 18px; accent-color: var(--shbyjm-cc-accent); }
.shbyjm-cc__cat-head input:disabled { cursor: not-allowed; }
.shbyjm-cc__cat-desc { margin: 8px 0 0 28px; font-size: .85rem; color: var(--shbyjm-cc-muted); }

/* ---------- footer manage button ---------- */

.shbyjm-cc__manage-link {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .shbyjm-cc--bottom-bar .shbyjm-cc__banner { flex-direction: column; align-items: stretch; }
    .shbyjm-cc__actions { justify-content: stretch; }
    .shbyjm-cc__btn { flex: 1 1 auto; text-align: center; }
}
