/* =========================================================================
   WP WCAG — frontend widget & accessibility mode overrides
   ========================================================================= */

/* ---------- widget container ---------- */

#wpwcag-root,
#wpwcag-root *,
#wpwcag-root *::before,
#wpwcag-root *::after { box-sizing: border-box; }

#wpwcag-root {
    position: fixed;
    z-index: 2147483600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #1e1e1e;
}

/* Trigger isolation — theme button/svg styles must not leak in */
#wpwcag-root .wpwcag-trigger,
#wpwcag-root .wpwcag-trigger * {
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}
#wpwcag-root .wpwcag-trig-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: inherit !important;
}
#wpwcag-root.wpwcag-pos-bottom-right { right: 20px; bottom: 20px; }
#wpwcag-root.wpwcag-pos-bottom-left  { left:  20px; bottom: 20px; }
#wpwcag-root.wpwcag-pos-top-right    { right: 20px; top:    20px; }
#wpwcag-root.wpwcag-pos-top-left     { left:  20px; top:    20px; }
#wpwcag-root.wpwcag-pos-middle-right { right: 20px; top: 50%; transform: translateY(-50%); }
#wpwcag-root.wpwcag-pos-middle-left  { left:  20px; top: 50%; transform: translateY(-50%); }

/* panel placement for middle positions (default/compact dropdowns) */
#wpwcag-root.wpwcag-pos-middle-right .wpwcag-panel { right: calc(100% + 10px); left: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
#wpwcag-root.wpwcag-pos-middle-left  .wpwcag-panel { left:  calc(100% + 10px); right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }

/* ---------- trigger button (base) ---------- */

.wpwcag-trigger {
    border: 2px solid var(--wpwcag-fg-border, #fff);
    background: var(--wpwcag-color, #1e1e1e);
    color: var(--wpwcag-icon-color, var(--wpwcag-fg, #fff));
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    padding: 0;
    transition: transform .15s ease;
    font-family: inherit;
}
.wpwcag-trigger:hover,
.wpwcag-trigger:focus-visible {
    transform: scale(1.06);
    outline: 3px solid var(--wpwcag-accent, #ffd700);
    outline-offset: 2px;
}
.wpwcag-trig-label { display: none; font-weight: 600; font-size: 14px; }

/* trigger size — drives button size (--wpwcag-ts), icon (--wpwcag-ti), label (--wpwcag-tl)
   so every shape (circle/square/pill/tab) scales consistently. */
#wpwcag-root.wpwcag-trigsize-small  { --wpwcag-ts: 40px; --wpwcag-ti: 20px; --wpwcag-tl: 11px; }
#wpwcag-root.wpwcag-trigsize-medium { --wpwcag-ts: 52px; --wpwcag-ti: 26px; --wpwcag-tl: 13px; }
#wpwcag-root.wpwcag-trigsize-large  { --wpwcag-ts: 64px; --wpwcag-ti: 32px; --wpwcag-tl: 15px; }
#wpwcag-root.wpwcag-trigsize-xlarge { --wpwcag-ts: 80px; --wpwcag-ti: 40px; --wpwcag-tl: 18px; }
#wpwcag-root.wpwcag-trigsize-custom {
    --wpwcag-ts: var(--wpwcag-trig-size, 52px);
    --wpwcag-ti: calc(var(--wpwcag-trig-size, 52px) * 0.5);
    --wpwcag-tl: calc(var(--wpwcag-trig-size, 52px) * 0.26);
}

/* circle / square: square button, icon = --wpwcag-ti */
#wpwcag-root.wpwcag-trigshape-circle .wpwcag-trigger,
#wpwcag-root.wpwcag-trigshape-square .wpwcag-trigger { width: var(--wpwcag-ts, 52px); height: var(--wpwcag-ts, 52px); }
#wpwcag-root.wpwcag-trigshape-circle .wpwcag-trigger > svg,
#wpwcag-root.wpwcag-trigshape-square .wpwcag-trigger > svg { width: var(--wpwcag-ti, 26px); height: var(--wpwcag-ti, 26px); }
#wpwcag-root .wpwcag-trigger > svg { width: var(--wpwcag-ti, 26px); height: var(--wpwcag-ti, 26px); }

/* trigger shape */
#wpwcag-root.wpwcag-trigshape-circle .wpwcag-trigger { border-radius: 50%; }
#wpwcag-root.wpwcag-trigshape-square .wpwcag-trigger { border-radius: 0; }

#wpwcag-root.wpwcag-trigshape-pill   .wpwcag-trigger {
    width: auto !important;
    height: auto !important;
    padding: calc(var(--wpwcag-ti, 26px) * 0.42) calc(var(--wpwcag-ti, 26px) * 0.7);
    border-radius: 999px;
    gap: 8px;
}
#wpwcag-root.wpwcag-trigshape-pill .wpwcag-trig-label { display: inline-block; font-size: var(--wpwcag-tl, 14px) !important; }
#wpwcag-root.wpwcag-trigshape-pill .wpwcag-trigger > svg { width: var(--wpwcag-ti, 26px); height: var(--wpwcag-ti, 26px); }

/* trigger shape: tab — vertical sliding bar attached to the screen edge */
#wpwcag-root.wpwcag-trigshape-tab .wpwcag-trigger {
    width: auto !important;
    height: auto !important;
    flex-direction: column;
    gap: calc(var(--wpwcag-ti, 22px) * 0.4);
    padding: calc(var(--wpwcag-ti, 22px) * 0.7) calc(var(--wpwcag-ti, 22px) * 0.42);
    border-width: 0;
    box-shadow: -2px 2px 10px rgba(0,0,0,.22);
}
#wpwcag-root.wpwcag-trigshape-tab .wpwcag-trig-label {
    display: inline-block;
    writing-mode: vertical-rl;
    font-size: var(--wpwcag-tl, 13px) !important;
    letter-spacing: .02em;
}
#wpwcag-root.wpwcag-trigshape-tab .wpwcag-trigger > svg { width: var(--wpwcag-ti, 22px); height: var(--wpwcag-ti, 22px); }
/* flush to the edge + rounded inner corners */
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-middle-right,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-top-right,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-bottom-right { right: 0; }
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-middle-left,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-top-left,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-bottom-left { left: 0; }
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-middle-right .wpwcag-trigger,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-top-right .wpwcag-trigger,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-bottom-right .wpwcag-trigger { border-radius: 10px 0 0 10px; }
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-middle-left .wpwcag-trigger,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-top-left .wpwcag-trigger,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-bottom-left .wpwcag-trigger { border-radius: 0 10px 10px 0; }
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-middle-left .wpwcag-trig-label,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-top-left .wpwcag-trig-label,
#wpwcag-root.wpwcag-trigshape-tab.wpwcag-pos-bottom-left .wpwcag-trig-label { writing-mode: vertical-lr; }
#wpwcag-root.wpwcag-trigshape-tab .wpwcag-trigger:hover { transform: none; }

/* trigger animations */
#wpwcag-root.wpwcag-anim-pulse  .wpwcag-trigger { animation: wpwcag-pulse  2.2s ease-out infinite; }
#wpwcag-root.wpwcag-anim-bounce .wpwcag-trigger { animation: wpwcag-bounce 1.8s ease-in-out infinite; }
#wpwcag-root.wpwcag-anim-shake  .wpwcag-trigger { animation: wpwcag-shake  3s ease-in-out infinite; }
#wpwcag-root.wpwcag-anim-glow   .wpwcag-trigger { animation: wpwcag-glow   2s ease-in-out infinite; }
#wpwcag-root.wpwcag-anim-float  .wpwcag-trigger { animation: wpwcag-float  3s ease-in-out infinite; }

@keyframes wpwcag-pulse {
    0%   { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0   color-mix(in srgb, var(--wpwcag-color, #1e1e1e) 60%, transparent); }
    70%  { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 16px transparent; }
    100% { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0   transparent; }
}
@keyframes wpwcag-bounce {
    0%, 55%, 100% { transform: translateY(0); }
    65%           { transform: translateY(-9px); }
    80%           { transform: translateY(-4px); }
}
@keyframes wpwcag-shake {
    0%, 88%, 100% { transform: rotate(0); }
    90%           { transform: rotate(-9deg); }
    92%           { transform: rotate(8deg); }
    94%           { transform: rotate(-6deg); }
    96%           { transform: rotate(4deg); }
    98%           { transform: rotate(-2deg); }
}
@keyframes wpwcag-glow {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0 rgba(0,0,0,0); }
    50%      { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 16px 4px var(--wpwcag-glow, var(--wpwcag-accent, #1976d2)); }
}
@keyframes wpwcag-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    #wpwcag-root[class*="wpwcag-anim-"] .wpwcag-trigger { animation: none !important; }
}

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

.wpwcag-panel {
    position: absolute;
    width: var(--wpwcag-panel-w, 360px);
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    background: #fff;
    color: #1d1d1d;
    border: 1px solid #d4d4d4;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    overflow: hidden;
    display: none;
    flex-direction: column;
}
#wpwcag-root.wpwcag-width-narrow .wpwcag-panel { --wpwcag-panel-w: 300px; }
#wpwcag-root.wpwcag-width-medium .wpwcag-panel { --wpwcag-panel-w: 360px; }
#wpwcag-root.wpwcag-width-wide   .wpwcag-panel { --wpwcag-panel-w: 440px; }
.wpwcag-panel.is-open { display: flex; }

#wpwcag-root.wpwcag-pos-bottom-right .wpwcag-panel { right: 0; bottom: 62px; }
#wpwcag-root.wpwcag-pos-bottom-left  .wpwcag-panel { left:  0; bottom: 62px; }
#wpwcag-root.wpwcag-pos-top-right    .wpwcag-panel { right: 0; top:    62px; }
#wpwcag-root.wpwcag-pos-top-left     .wpwcag-panel { left:  0; top:    62px; }

.wpwcag-panel-head {
    background: var(--wpwcag-color, #1e1e1e);
    color: var(--wpwcag-fg, #fff);
    padding: 12px 16px;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
#wpwcag-root .wpwcag-panel-head h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: var(--wpwcag-fg, #fff) !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border: none !important;
}
.wpwcag-close {
    background: rgba(255,255,255,.12);
    border: 2px solid var(--wpwcag-fg-border, rgba(255,255,255,.7));
    color: var(--wpwcag-fg, #fff);
    width: 34px; height: 34px;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    font-family: inherit;
    border-radius: 4px;
    flex-shrink: 0;
}
.wpwcag-close:hover,
.wpwcag-close:focus-visible { background: rgba(255,255,255,.22); outline: none; transform: scale(1.06); }

.wpwcag-panel-body { padding: 4px 16px 8px; overflow-y: auto; }

/* ---------- Typography isolation — protect panel from theme styles ---------- */
#wpwcag-root .wpwcag-panel,
#wpwcag-root .wpwcag-panel *,
#wpwcag-root .wpwcag-panel *::before,
#wpwcag-root .wpwcag-panel *::after {
    box-sizing: border-box;
    font-family: inherit !important;
    text-transform: none;
    letter-spacing: normal;
    text-shadow: none;
}
#wpwcag-root .wpwcag-panel h1,
#wpwcag-root .wpwcag-panel h2,
#wpwcag-root .wpwcag-panel h3,
#wpwcag-root .wpwcag-panel h4,
#wpwcag-root .wpwcag-panel h5,
#wpwcag-root .wpwcag-panel h6,
#wpwcag-root .wpwcag-panel p,
#wpwcag-root .wpwcag-panel span,
#wpwcag-root .wpwcag-panel button,
#wpwcag-root .wpwcag-panel label,
#wpwcag-root .wpwcag-panel input {
    background-image: none;
    text-decoration: none;
    box-shadow: none;
}

#wpwcag-root .wpwcag-intro {
    font-size: 12px !important;
    color: #555 !important;
    margin: 8px 0 4px !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
    border: none !important;
}

#wpwcag-root .wpwcag-group-sect { margin: 4px 0 0; }
#wpwcag-root .wpwcag-group-title {
    margin: 12px 0 6px !important;
    padding: 0 0 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #555 !important;
    line-height: 1.2 !important;
    border: none !important;
    border-bottom: 1px solid #ececec !important;
    background: none !important;
}

#wpwcag-root .wpwcag-row {
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
}
#wpwcag-root .wpwcag-row:last-child { border-bottom: none; }
#wpwcag-root .wpwcag-row-label {
    font-weight: 600 !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    color: #1d1d1d !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    border: none !important;
}
.wpwcag-group { display: flex; flex-wrap: wrap; gap: 4px; }
#wpwcag-root .wpwcag-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 4px !important;
    margin: 0 !important;
    border: 1px solid #c4c4c4;
    background: #fff;
    color: #1d1d1d;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    text-align: center;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    height: auto !important;
    min-height: 0 !important;
}
.wpwcag-btn:hover  { background: #f5f5f5; }
.wpwcag-btn:focus-visible { outline: 2px solid #1976d2; outline-offset: 1px; }
#wpwcag-root .wpwcag-btn.is-active {
    background: var(--wpwcag-accent, #1976d2) !important;
    color: #fff !important;
    border-color: var(--wpwcag-accent, #1976d2) !important;
    font-weight: 600 !important;
}

.wpwcag-toggle-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
    gap: 12px;
}
.wpwcag-toggle-row:last-child { border-bottom: none; }
#wpwcag-root .wpwcag-toggle-row .label {
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: 400 !important;
    color: #1d1d1d !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpwcag-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; display: inline-block; }
.wpwcag-switch input { opacity: 0; width: 0; height: 0; }
.wpwcag-switch span { position: absolute; inset: 0; background: #ccc; border-radius: 22px; cursor: pointer; transition: background .15s; }
.wpwcag-switch span::before {
    content: ""; position: absolute;
    width: 16px; height: 16px;
    background: #fff; border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform .15s;
}
.wpwcag-switch input:checked + span         { background: var(--wpwcag-accent, #1976d2); }
.wpwcag-switch input:checked + span::before { transform: translateX(18px); }
.wpwcag-switch input:focus-visible + span   { outline: 2px solid #1976d2; outline-offset: 2px; }

.wpwcag-panel-foot { padding: 10px 16px; border-top: 1px solid #e0e0e0; flex-shrink: 0; background: #fafafa; }
#wpwcag-root .wpwcag-foot-actions { display: flex; gap: 6px; }
#wpwcag-root .wpwcag-reset,
#wpwcag-root .wpwcag-close-bottom {
    flex: 1 1 0;
    padding: 10px !important;
    margin: 0 !important;
    cursor: pointer;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    height: auto !important;
    min-height: 0 !important;
}
#wpwcag-root .wpwcag-reset {
    background: #fff;
    border: 1px solid #c4c4c4;
    color: #1d1d1d;
}
#wpwcag-root .wpwcag-close-bottom {
    background: var(--wpwcag-color, #1e1e1e);
    color: var(--wpwcag-fg, #fff);
    border: 1px solid var(--wpwcag-color, #1e1e1e);
}
.wpwcag-reset:hover        { background: #f0f0f0; }
.wpwcag-close-bottom:hover { filter: brightness(1.1); }
#wpwcag-root .wpwcag-reset:focus-visible,
#wpwcag-root .wpwcag-close-bottom:focus-visible { outline: 2px solid var(--wpwcag-accent, #1976d2); outline-offset: 2px; }
#wpwcag-root .wpwcag-close {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
}
#wpwcag-root .wpwcag-statement-link {
    display: block;
    text-align: center;
    margin-top: 9px;
    font-size: 12px;
    color: var(--wpwcag-accent, #1976d2);
    text-decoration: underline;
}
#wpwcag-root .wpwcag-statement-link:hover { text-decoration: none; }

/* =========================================================================
   Icons
   ========================================================================= */
#wpwcag-root .wpwcag-i { display: block; width: 20px; height: 20px; }

#wpwcag-root .wpwcag-row-label { display: flex; align-items: center; gap: 8px; }
#wpwcag-root .wpwcag-row-ico {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #555;
}
#wpwcag-root .wpwcag-toggle-row { gap: 10px; }
#wpwcag-root .wpwcag-toggle-row .label { flex: 1; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-row-ico { color: #cfcfcf; }

/* =========================================================================
   Accessibility profiles (cards)
   ========================================================================= */
#wpwcag-root .wpwcag-profiles-sect { margin: 4px 0 2px; }
#wpwcag-root .wpwcag-profiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 4px;
}
#wpwcag-root .wpwcag-profile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px;
    border: 1px solid #d8d8d8;
    background: #fff;
    cursor: pointer;
    text-align: left;
    border-radius: 8px;
    font-family: inherit !important;
}
#wpwcag-root .wpwcag-profile:hover { background: #f6f6f6; }
#wpwcag-root .wpwcag-profile:focus-visible { outline: 2px solid var(--wpwcag-accent, #1976d2); outline-offset: 1px; }
#wpwcag-root .wpwcag-profile-ico { color: #555; margin-bottom: 2px; }
#wpwcag-root .wpwcag-profile-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #1d1d1d !important;
}
#wpwcag-root .wpwcag-profile-desc {
    font-size: 10.5px !important;
    font-weight: 400 !important;
    color: #777 !important;
    line-height: 1.2 !important;
}
#wpwcag-root .wpwcag-profile.is-active {
    border-color: var(--wpwcag-accent, #1976d2);
    background: var(--wpwcag-accent, #1976d2);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
#wpwcag-root .wpwcag-profile.is-active .wpwcag-profile-ico,
#wpwcag-root .wpwcag-profile.is-active .wpwcag-profile-label { color: #fff !important; }
#wpwcag-root .wpwcag-profile.is-active .wpwcag-profile-desc { color: #fff !important; opacity: .85; }
#wpwcag-root .wpwcag-profile.is-active::after {
    content: "✓";
    position: absolute;
    top: 6px; right: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

/* =========================================================================
   Tiles (toggle features as cards)
   ========================================================================= */
#wpwcag-root .wpwcag-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 4px 0 2px;
}
#wpwcag-root .wpwcag-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #d8d8d8;
    background: #fff;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    font-family: inherit !important;
    min-height: 74px;
    transition: background .12s, border-color .12s;
}
#wpwcag-root .wpwcag-tile:hover { background: #f6f6f6; }
#wpwcag-root .wpwcag-tile:focus-visible { outline: 2px solid var(--wpwcag-accent, #1976d2); outline-offset: 1px; }
#wpwcag-root .wpwcag-tile-ico { color: #555; }
#wpwcag-root .wpwcag-tile-label {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    color: #1d1d1d !important;
}
#wpwcag-root .wpwcag-tile.is-active {
    border-color: var(--wpwcag-accent, #1976d2);
    background: var(--wpwcag-accent, #1976d2);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
#wpwcag-root .wpwcag-tile.is-active .wpwcag-tile-ico  { color: #fff; }
#wpwcag-root .wpwcag-tile.is-active .wpwcag-tile-label { color: #fff !important; font-weight: 600 !important; }
#wpwcag-root .wpwcag-tile.is-active::after {
    content: "✓";
    position: absolute;
    top: 5px; right: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

/* dark theme — profiles & tiles */
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile,
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile        { background: #2a2a2a; border-color: #444; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile:hover,
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile:hover  { background: #333; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile-label,
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile-label  { color: #e8e8e8 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile-ico,
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile-ico    { color: #cfcfcf; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile-desc { color: #999 !important; }
/* keep accent fill on active even in dark theme */
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile.is-active,
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile.is-active { background: var(--wpwcag-accent, #1976d2); }
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile.is-active .wpwcag-tile-label,
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile.is-active .wpwcag-profile-label { color: #fff !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-tile.is-active .wpwcag-tile-ico,
#wpwcag-root.wpwcag-theme-dark .wpwcag-profile.is-active .wpwcag-profile-ico { color: #fff; }

/* =========================================================================
   Template variants
   ========================================================================= */

/* default — current dropdown (no extra rules needed) */

/* compact: tighter spacing, smaller width default */
#wpwcag-root.wpwcag-tpl-compact .wpwcag-panel:not([style*="--wpwcag-panel-w"]) { --wpwcag-panel-w: 280px; }
#wpwcag-root.wpwcag-tpl-compact .wpwcag-panel-body { padding: 2px 12px 6px; }
#wpwcag-root.wpwcag-tpl-compact .wpwcag-row,
#wpwcag-root.wpwcag-tpl-compact .wpwcag-toggle-row { padding: 6px 0; }
#wpwcag-root.wpwcag-tpl-compact .wpwcag-row-label,
#wpwcag-root.wpwcag-tpl-compact .wpwcag-toggle-row .label { font-size: 12px; }
#wpwcag-root.wpwcag-tpl-compact .wpwcag-btn { padding: 5px 4px; font-size: 11px; }
#wpwcag-root.wpwcag-tpl-compact .wpwcag-group-title { margin: 8px 0 4px; }

/* sidebar: full-height drawer from the side */
#wpwcag-root.wpwcag-tpl-sidebar .wpwcag-panel {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    max-height: 100vh;
    border-radius: 0;
    width: var(--wpwcag-panel-w, 360px);
}
#wpwcag-root.wpwcag-tpl-sidebar.wpwcag-pos-bottom-right .wpwcag-panel,
#wpwcag-root.wpwcag-tpl-sidebar.wpwcag-pos-top-right    .wpwcag-panel { right: 0 !important; left: auto !important; }
#wpwcag-root.wpwcag-tpl-sidebar.wpwcag-pos-bottom-left  .wpwcag-panel,
#wpwcag-root.wpwcag-tpl-sidebar.wpwcag-pos-top-left     .wpwcag-panel { left: 0 !important; right: auto !important; }

/* modal: centered with backdrop */
#wpwcag-root.wpwcag-tpl-modal .wpwcag-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 92vw;
    max-height: 84vh;
}
.wpwcag-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2147483550;
    display: none;
}
.wpwcag-backdrop.is-open { display: block; }

/* =========================================================================
   Panel theme: dark
   ========================================================================= */
#wpwcag-root.wpwcag-theme-dark .wpwcag-panel        { background: #1f1f1f; color: #e8e8e8; border-color: #3a3a3a; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-row-label,
#wpwcag-root.wpwcag-theme-dark .wpwcag-toggle-row .label { color: #e8e8e8 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-btn          { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-btn:hover    { background: #333 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-panel-foot   { background: #181818; border-top-color: #333; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-reset        { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-reset:hover  { background: #333 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-group-title  { color: #aaa !important; border-bottom-color: #333 !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-row,
#wpwcag-root.wpwcag-theme-dark .wpwcag-toggle-row   { border-bottom-color: #333; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-intro        { color: #aaa !important; }
#wpwcag-root.wpwcag-theme-dark .wpwcag-switch span  { background: #555; }

/* =========================================================================
   Panel theme: sepia (warm)
   ========================================================================= */
#wpwcag-root.wpwcag-theme-sepia .wpwcag-panel        { background: #f4ecd8; color: #4b3a26; border-color: #ddcfae; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-row-label,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-toggle-row .label,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile-label,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile-label { color: #4b3a26 !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-btn,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-reset { background: #fbf6e9 !important; color: #4b3a26 !important; border-color: #ddcfae !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-btn:hover,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-reset:hover { background: #f0e6cc !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-panel-foot   { background: #efe5cd; border-top-color: #ddcfae; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-group-title  { color: #7a6647 !important; border-bottom-color: #e2d6b8 !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-row,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-toggle-row   { border-bottom-color: #e2d6b8; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-intro        { color: #7a6647 !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-row-ico,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile-ico,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile-ico  { color: #8a7350; }

/* =========================================================================
   Panel theme: custom (user colors via CSS variables)
   ========================================================================= */
#wpwcag-root.wpwcag-theme-custom .wpwcag-panel        { background: var(--wpwcag-panel-bg, #fff); color: var(--wpwcag-panel-text, #1d1d1d); }
#wpwcag-root.wpwcag-theme-custom .wpwcag-row-label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-toggle-row .label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile-label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile-label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-group-title,
#wpwcag-root.wpwcag-theme-custom .wpwcag-intro { color: var(--wpwcag-panel-text, #1d1d1d) !important; }
#wpwcag-root.wpwcag-theme-custom .wpwcag-group-title { opacity: .75; border-bottom-color: rgba(127,127,127,.3) !important; }
#wpwcag-root.wpwcag-theme-custom .wpwcag-btn,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile,
#wpwcag-root.wpwcag-theme-custom .wpwcag-reset {
    background: transparent !important;
    color: var(--wpwcag-panel-text, #1d1d1d) !important;
    border-color: rgba(127,127,127,.4) !important;
}
#wpwcag-root.wpwcag-theme-custom .wpwcag-panel-foot { background: rgba(127,127,127,.06); border-top-color: rgba(127,127,127,.3); }
#wpwcag-root.wpwcag-theme-custom .wpwcag-row,
#wpwcag-root.wpwcag-theme-custom .wpwcag-toggle-row { border-bottom-color: rgba(127,127,127,.2); }
#wpwcag-root.wpwcag-theme-custom .wpwcag-row-ico,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile-ico,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile-ico { color: var(--wpwcag-panel-text, #1d1d1d); opacity: .8; }
/* active states keep the accent fill in custom/sepia */
#wpwcag-root.wpwcag-theme-sepia .wpwcag-btn.is-active,
#wpwcag-root.wpwcag-theme-custom .wpwcag-btn.is-active,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile.is-active,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile.is-active,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile.is-active,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile.is-active {
    background: var(--wpwcag-accent, #1976d2) !important;
    border-color: var(--wpwcag-accent, #1976d2) !important;
}
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile.is-active .wpwcag-tile-label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile.is-active .wpwcag-tile-label,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile.is-active .wpwcag-profile-label,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile.is-active .wpwcag-profile-label,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-btn.is-active,
#wpwcag-root.wpwcag-theme-custom .wpwcag-btn.is-active { color: #fff !important; }
#wpwcag-root.wpwcag-theme-sepia .wpwcag-tile.is-active .wpwcag-tile-ico,
#wpwcag-root.wpwcag-theme-custom .wpwcag-tile.is-active .wpwcag-tile-ico,
#wpwcag-root.wpwcag-theme-sepia .wpwcag-profile.is-active .wpwcag-profile-ico,
#wpwcag-root.wpwcag-theme-custom .wpwcag-profile.is-active .wpwcag-profile-ico { color: #fff; }

/* =========================================================================
   Header style: minimal (no colored bar)
   ========================================================================= */
#wpwcag-root.wpwcag-header-minimal .wpwcag-panel-head {
    background: transparent;
    color: inherit;
    border-bottom: 1px solid #ececec;
}
#wpwcag-root.wpwcag-header-minimal .wpwcag-panel-head h2 { color: inherit; }
#wpwcag-root.wpwcag-header-minimal .wpwcag-close         { color: inherit; border-color: currentColor; opacity: .7; }
#wpwcag-root.wpwcag-theme-dark.wpwcag-header-minimal .wpwcag-panel-head { border-bottom-color: #333; }

/* =========================================================================
   Button radius in panel
   ========================================================================= */
#wpwcag-root.wpwcag-btnrad-square  .wpwcag-btn,
#wpwcag-root.wpwcag-btnrad-square  .wpwcag-reset { border-radius: 0; }
#wpwcag-root.wpwcag-btnrad-rounded .wpwcag-btn,
#wpwcag-root.wpwcag-btnrad-rounded .wpwcag-reset { border-radius: 6px; }
#wpwcag-root.wpwcag-btnrad-pill    .wpwcag-btn,
#wpwcag-root.wpwcag-btnrad-pill    .wpwcag-reset { border-radius: 999px; }

/* accent color for focus rings (text + buttons) */
.wpwcag-btn:focus-visible,
.wpwcag-switch input:focus-visible + span,
.wpwcag-reset:focus-visible {
    outline-color: var(--wpwcag-accent, #1976d2) !important;
}

/* ---------- reading guide bar ---------- */

#wpwcag-reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 24px;
    background: rgba(0,0,0,.55);
    z-index: 2147483500;
    pointer-events: none;
    display: none;
}
html.wpwcag-readingGuide #wpwcag-reading-guide { display: block; }

/* read-mode (visual hint) */
html.wpwcag-read-mode body :hover { cursor: help !important; }

/* =========================================================================
   Accessibility mode overrides (applied to <html>)
   Selectors deliberately exclude the widget (#wpwcag-root).
   ========================================================================= */

/* ----- letter spacing ----- */
html.wpwcag-letterSpacing-1 body, html.wpwcag-letterSpacing-1 body *:not(#wpwcag-root):not(#wpwcag-root *) { letter-spacing: 0.05em !important; }
html.wpwcag-letterSpacing-2 body, html.wpwcag-letterSpacing-2 body *:not(#wpwcag-root):not(#wpwcag-root *) { letter-spacing: 0.1em  !important; }

/* ----- word spacing ----- */
html.wpwcag-wordSpacing-1 body, html.wpwcag-wordSpacing-1 body *:not(#wpwcag-root):not(#wpwcag-root *) { word-spacing: 0.16em !important; }
html.wpwcag-wordSpacing-2 body, html.wpwcag-wordSpacing-2 body *:not(#wpwcag-root):not(#wpwcag-root *) { word-spacing: 0.32em !important; }

/* ----- line height ----- */
html.wpwcag-lineHeight-1 body, html.wpwcag-lineHeight-1 body *:not(#wpwcag-root):not(#wpwcag-root *) { line-height: 1.7 !important; }
html.wpwcag-lineHeight-2 body, html.wpwcag-lineHeight-2 body *:not(#wpwcag-root):not(#wpwcag-root *) { line-height: 2   !important; }

/* ----- paragraph spacing ----- */
html.wpwcag-paragraphSpacing-1 p, html.wpwcag-paragraphSpacing-1 ul, html.wpwcag-paragraphSpacing-1 ol, html.wpwcag-paragraphSpacing-1 blockquote, html.wpwcag-paragraphSpacing-1 figure { margin-bottom: 1.5em !important; }
html.wpwcag-paragraphSpacing-2 p, html.wpwcag-paragraphSpacing-2 ul, html.wpwcag-paragraphSpacing-2 ol, html.wpwcag-paragraphSpacing-2 blockquote, html.wpwcag-paragraphSpacing-2 figure { margin-bottom: 2.5em !important; }

/* ----- text align left ----- */
html.wpwcag-textAlignLeft body, html.wpwcag-textAlignLeft body *:not(#wpwcag-root):not(#wpwcag-root *) { text-align: left !important; }

/* ----- bold text ----- */
html.wpwcag-boldText body, html.wpwcag-boldText body *:not(#wpwcag-root):not(#wpwcag-root *) { font-weight: 700 !important; }

/* ----- readable font ----- */
html.wpwcag-readableFont body, html.wpwcag-readableFont body *:not(#wpwcag-root):not(#wpwcag-root *) {
    font-family: Arial, Verdana, Tahoma, sans-serif !important;
}

/* ----- contrast: high ----- */
html.wpwcag-contrast-high body,
html.wpwcag-contrast-high body *:not(#wpwcag-root):not(#wpwcag-root *) {
    background-color: #000 !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
    background-image: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
html.wpwcag-contrast-high a,
html.wpwcag-contrast-high a *:not(#wpwcag-root):not(#wpwcag-root *) {
    color: #ffffff !important;
    text-decoration: underline !important;
}
html.wpwcag-contrast-high img,
html.wpwcag-contrast-high video {
    filter: grayscale(1) contrast(1.2);
}

/* NOTE: visual filters are applied to body's top-level children, NOT to <body>
   itself. A filter on <body> changes the containing block for position:fixed,
   which would detach the floating widget and push it to the bottom of the page.
   Excluding the widget (and its helpers) keeps it pinned to the viewport. */

/* ----- contrast: inverted ----- */
html.wpwcag-contrast-inverted body > *:not(#wpwcag-root):not(#wpwcag-reading-guide):not(.wpwcag-backdrop) {
    filter: invert(1) hue-rotate(180deg) !important;
}
html.wpwcag-contrast-inverted img,
html.wpwcag-contrast-inverted video,
html.wpwcag-contrast-inverted iframe,
html.wpwcag-contrast-inverted picture {
    filter: invert(1) hue-rotate(180deg) !important;
}

/* ----- grayscale ----- */
html.wpwcag-grayscale body > *:not(#wpwcag-root):not(#wpwcag-reading-guide):not(.wpwcag-backdrop) { filter: grayscale(1) !important; }

/* ----- high saturation ----- */
html.wpwcag-highSaturation body > *:not(#wpwcag-root):not(#wpwcag-reading-guide):not(.wpwcag-backdrop) { filter: saturate(2) !important; }

/* ----- low saturation ----- */
html.wpwcag-lowSaturation body > *:not(#wpwcag-root):not(#wpwcag-reading-guide):not(.wpwcag-backdrop) { filter: saturate(0.3) !important; }

/* ----- dark mode ----- */
html.wpwcag-darkMode body,
html.wpwcag-darkMode body *:not(#wpwcag-root):not(#wpwcag-root *) {
    background-color: #1a1a1a !important;
    color: #e8e8e8 !important;
    border-color: #555 !important;
    background-image: none !important;
}
html.wpwcag-darkMode a,
html.wpwcag-darkMode a *:not(#wpwcag-root):not(#wpwcag-root *) { color: #66b3ff !important; }
html.wpwcag-darkMode img { opacity: 0.85; }

/* ----- light mode ----- */
html.wpwcag-lightMode body,
html.wpwcag-lightMode body *:not(#wpwcag-root):not(#wpwcag-root *) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #cccccc !important;
    background-image: none !important;
}
html.wpwcag-lightMode a,
html.wpwcag-lightMode a *:not(#wpwcag-root):not(#wpwcag-root *) { color: #0d3b66 !important; }

/* ----- underline links ----- */
html.wpwcag-linksUnderline a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 2px !important;
}

/* ----- highlight headings ----- */
html.wpwcag-highlightHeadings h1,
html.wpwcag-highlightHeadings h2,
html.wpwcag-highlightHeadings h3,
html.wpwcag-highlightHeadings h4,
html.wpwcag-highlightHeadings h5,
html.wpwcag-highlightHeadings h6 {
    outline: 2px dashed #1976d2 !important;
    outline-offset: 4px;
    padding: 4px !important;
}

/* ----- highlight focus ----- */
html.wpwcag-highlightFocus *:focus,
html.wpwcag-highlightFocus *:focus-visible {
    outline: 3px solid #ff9800 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px #fff inset !important;
}

/* ----- highlight buttons ----- */
html.wpwcag-highlightButtons body button:not(.wpwcag-btn):not(.wpwcag-close):not(.wpwcag-reset):not(.wpwcag-trigger),
html.wpwcag-highlightButtons body input[type="submit"],
html.wpwcag-highlightButtons body input[type="button"],
html.wpwcag-highlightButtons body input[type="reset"],
html.wpwcag-highlightButtons body [role="button"] {
    outline: 2px solid #1976d2 !important;
    outline-offset: 2px !important;
    background-color: #e3f2fd !important;
}

/* ----- highlight forms ----- */
html.wpwcag-highlightForms body input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
html.wpwcag-highlightForms body select,
html.wpwcag-highlightForms body textarea {
    outline: 2px solid #1b5e20 !important;
    outline-offset: 2px !important;
    background-color: #fffde7 !important;
}

/* ----- large cursor ----- */
html.wpwcag-largeCursor,
html.wpwcag-largeCursor body *:not(#wpwcag-root):not(#wpwcag-root *) {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><path fill='%23000' stroke='%23fff' stroke-width='1.5' d='M4 2 L4 24 L10 18 L14 28 L18 26 L14 16 L22 16 Z'/></svg>") 2 2, auto !important;
}
html.wpwcag-largeCursor body a,
html.wpwcag-largeCursor body button:not(.wpwcag-trigger):not(.wpwcag-close):not(.wpwcag-btn):not(.wpwcag-reset),
html.wpwcag-largeCursor body [role="button"],
html.wpwcag-largeCursor body input[type="submit"],
html.wpwcag-largeCursor body input[type="button"],
html.wpwcag-largeCursor body label,
html.wpwcag-largeCursor body select {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><path fill='%23000' stroke='%23fff' stroke-width='1.5' d='M11 2 L13 2 L13 12 L19 6 L21 8 L15 14 L23 14 L23 16 L15 16 L21 24 L19 26 L13 18 L13 28 L11 28 Z'/></svg>") 12 4, pointer !important;
}

/* ----- hide images ----- */
html.wpwcag-hideImages body img,
html.wpwcag-hideImages body picture,
html.wpwcag-hideImages body video,
html.wpwcag-hideImages body iframe {
    visibility: hidden !important;
    background-color: #ececec !important;
    outline: 1px dashed #bbb !important;
}

/* ----- stop animations ----- */
html.wpwcag-stopAnimations *,
html.wpwcag-stopAnimations *::before,
html.wpwcag-stopAnimations *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
}

/* =========================================================================
   Inline controls (shortcode [wp_wcag_control])
   ========================================================================= */
.wpwcag-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.4;
}
.wpwcag-inline-control .wpwcag-ic-label { font-weight: 600; color: inherit; }
.wpwcag-inline-control .wpwcag-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.wpwcag-inline-control .wpwcag-btn {
    padding: 6px 12px;
    border: 1px solid #c4c4c4;
    background: #fff;
    color: #1d1d1d;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.2;
    border-radius: 4px;
}
.wpwcag-inline-control .wpwcag-btn:hover { background: #f5f5f5; }
.wpwcag-inline-control .wpwcag-btn:focus-visible { outline: 2px solid var(--wpwcag-accent, #1976d2); outline-offset: 1px; }
.wpwcag-inline-control .wpwcag-btn.is-active {
    background: var(--wpwcag-accent, #1976d2);
    color: #fff;
    border-color: var(--wpwcag-accent, #1976d2);
    font-weight: 600;
}
.wpwcag-inline-control .wpwcag-switch { position: relative; width: 40px; height: 22px; display: inline-block; flex-shrink: 0; }
.wpwcag-inline-control .wpwcag-switch input { opacity: 0; width: 0; height: 0; }
.wpwcag-inline-control .wpwcag-switch span { position: absolute; inset: 0; background: #ccc; border-radius: 22px; cursor: pointer; transition: background .15s; }
.wpwcag-inline-control .wpwcag-switch span::before { content: ""; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform .15s; }
.wpwcag-inline-control .wpwcag-switch input:checked + span { background: var(--wpwcag-accent, #1976d2); }
.wpwcag-inline-control .wpwcag-switch input:checked + span::before { transform: translateX(18px); }
.wpwcag-inline-control .wpwcag-switch input:focus-visible + span { outline: 2px solid var(--wpwcag-accent, #1976d2); outline-offset: 2px; }

/* =========================================================================
   Accessibility statement (shortcode output)
   ========================================================================= */

.wpwcag-statement { max-width: 820px; margin: 0 auto; line-height: 1.6; }
.wpwcag-statement h2 { margin-top: 0; }
.wpwcag-statement h3 { margin-top: 1.6em; }
.wpwcag-statement ul { padding-left: 1.4em; }

/* =========================================================================
   Mobile responsive — keep the panel on screen, not overflowing.
   Breakpoint covers most phones (up to 820 CSS px for landscape /
   high-density viewports) AND any touch device that lacks hover.
   ========================================================================= */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
    /* Critical: no transform on root, otherwise position:fixed children
       are anchored to the (tiny) trigger instead of the viewport,
       collapsing the panel into a narrow vertical strip. */
    #wpwcag-root { transform: none !important; }

    /* Reposition middle-edge triggers without using transform */
    #wpwcag-root.wpwcag-pos-middle-right { right: 12px; top: 42%; }
    #wpwcag-root.wpwcag-pos-middle-left  { left:  12px; top: 42%; }

    /* default / compact / tiles → bottom sheet anchored to screen edges.
       Use very high specificity (id + 3 classes) + !important so it wins
       against every per-position rule (right/left/top/bottom). */
    #wpwcag-root:not(.wpwcag-tpl-sidebar):not(.wpwcag-tpl-modal) .wpwcag-panel {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: 8px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 82vh !important;
        transform: none !important;
        --wpwcag-panel-w: auto;
        border-radius: 10px;
        z-index: 2147483601;
    }

    /* sidebar → full screen drawer */
    #wpwcag-root.wpwcag-tpl-sidebar .wpwcag-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        --wpwcag-panel-w: 100vw;
    }

    /* modal → fit width with margin */
    #wpwcag-root.wpwcag-tpl-modal .wpwcag-panel {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        max-height: 85vh !important;
    }

    /* larger close X for thumbs */
    #wpwcag-root .wpwcag-close { width: 40px; height: 40px; font-size: 26px; }

    /* cap trigger size to avoid covering the screen if user picked huge */
    #wpwcag-root .wpwcag-trigger { max-width: 80vw; }

    /* tiles: keep 2 columns but tighter padding */
    #wpwcag-root .wpwcag-tiles,
    #wpwcag-root .wpwcag-profiles { grid-template-columns: repeat(2, 1fr); }

    /* sidebar tab trigger should not push beyond screen */
    #wpwcag-root.wpwcag-trigshape-tab .wpwcag-trigger { padding: 12px 6px; }
}

/* very small phones — collapse to 1-column tile/profile grids */
@media (max-width: 380px) {
    #wpwcag-root .wpwcag-tiles { grid-template-columns: 1fr; }
}
