.jcmp-root,
.jcmp-root * {
    box-sizing: border-box;
}
.jcmp-root {
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
    direction: rtl;
    text-align: right;
    color: var(--jcmp-text, #111827);
    line-height: 1.75;
}

/* v1.9.3: force selected custom font across every visible consent element */
#jcmp-root,
#jcmp-root *:not(svg):not(path),
#jcmp-root button,
#jcmp-root input,
#jcmp-root select,
#jcmp-root textarea,
.jcmp-open-settings-shortcode,
.jcmp-do-not-sell,
.jcmp-do-not-sell *:not(svg):not(path),
.jcmp-debug-status,
.jcmp-debug-status *:not(svg):not(path),
.jcmp-policy,
.jcmp-policy *:not(svg):not(path),
.jcmp-blocked-placeholder,
.jcmp-blocked-placeholder *:not(svg):not(path) {
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif) !important;
}
.jcmp-root[data-direction="ltr"] {
    direction: ltr;
    text-align: left;
}
.jcmp-consent-shell {
    position: fixed;
    z-index: 999999;
    padding: 18px;
    pointer-events: none;
}
.jcmp-root[data-position="bottom-center"] .jcmp-consent-shell {
    inset-inline: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
}
.jcmp-root[data-position="top-center"] .jcmp-consent-shell {
    inset-inline: 0;
    top: 0;
    display: flex;
    justify-content: center;
}
.jcmp-root[data-position="bottom-right"] .jcmp-consent-shell {
    right: 0;
    bottom: 0;
}
.jcmp-root[data-position="bottom-left"] .jcmp-consent-shell {
    left: 0;
    bottom: 0;
}
.jcmp-root[data-position="center"] .jcmp-consent-shell {
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--jcmp-modal-overlay, rgba(15,23,42,.42));
}
.jcmp-banner {
    width: min(var(--jcmp-max-width, 760px), calc(100vw - 32px));
    pointer-events: auto;
    border-radius: var(--jcmp-radius, 24px);
    border: var(--jcmp-border-width, 1px) solid var(--jcmp-border, #e5e7eb);
    background: var(--jcmp-bg-rgba, rgba(255,255,255,.92));
    color: var(--jcmp-text, #111827);
    box-shadow: var(--jcmp-shadow, 0 28px 56px rgba(15,23,42,.18));
    backdrop-filter: blur(var(--jcmp-blur, 14px));
    -webkit-backdrop-filter: blur(var(--jcmp-blur, 14px));
    overflow: hidden;
    animation: jcmp-slide-up .32s ease both;
}
.jcmp-root[data-layout="bar"] .jcmp-banner {
    width: min(1180px, calc(100vw - 32px));
}
.jcmp-root[data-layout="minimal"] .jcmp-banner {
    width: min(560px, calc(100vw - 32px));
}
.jcmp-banner-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--jcmp-banner-gap, 16px);
    padding: var(--jcmp-banner-py, 22px) var(--jcmp-banner-px, 22px);
}
.jcmp-root[data-layout="bar"] .jcmp-banner-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}
.jcmp-icon {
    display: inline-grid;
    place-items: center;
    width: var(--jcmp-icon-box, 48px);
    height: var(--jcmp-icon-box, 48px);
    border-radius: var(--jcmp-icon-radius, 18px);
    background: var(--jcmp-icon-bg, #ccfbf1);
    color: var(--jcmp-icon, #0F766E);
    flex: 0 0 auto;
}
.jcmp-icon svg {
    width: var(--jcmp-icon-size, 24px);
    height: var(--jcmp-icon-size, 24px);
    fill: currentColor;
}
.jcmp-content h3 {
    margin: 0 0 var(--jcmp-content-gap, 6px);
    font-size: var(--jcmp-title-size, 18px);
    color: var(--jcmp-text, #111827);
    font-weight: var(--jcmp-title-weight, 900);
    line-height: 1.5;
}
.jcmp-content p {
    margin: 0;
    font-size: var(--jcmp-body-size, 13px);
    font-weight: var(--jcmp-body-weight, 500);
    color: var(--jcmp-muted, #6b7280);
}

/* v1.9.5: default justified explanatory text */
.jcmp-content p,
.jcmp-modal-header p,
.jcmp-category-row p,
.jcmp-modal-body p,
.jcmp-policy p,
.jcmp-policy-table td,
.jcmp-do-not-sell p,
.jcmp-debug-status p,
.jcmp-blocked-placeholder p {
    text-align: var(--jcmp-text-align, justify);
    text-align-last: var(--jcmp-text-align-last, right);
}
.jcmp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--jcmp-actions-gap, 10px);
    margin-top: var(--jcmp-actions-mt, 16px);
}
.jcmp-root[data-layout="bar"] .jcmp-actions {
    margin-top: 0;
    justify-content: flex-end;
    min-width: 330px;
}
.jcmp-btn {
    appearance: none;
    border: 0;
    border-radius: var(--jcmp-button-radius, 12px);
    padding: var(--jcmp-button-py, 11px) var(--jcmp-button-px, 15px);
    min-height: var(--jcmp-button-min-h, 42px);
    font-family: inherit;
    font-size: var(--jcmp-button-size, 13px);
    font-weight: var(--jcmp-button-weight, 850);
    cursor: pointer;
    line-height: 1.4;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background-color .18s ease, color .18s ease;
}
.jcmp-btn:hover {
    transform: translateY(-1px);
}
.jcmp-btn-primary {
    background: var(--jcmp-primary-bg, var(--jcmp-accent, #0F766E));
    color: var(--jcmp-primary-text, var(--jcmp-accent-text, #fff));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--jcmp-accent, #0F766E) 28%, transparent);
}
.jcmp-btn-primary:hover {
    background: var(--jcmp-primary-hover-bg, #115e59);
    color: var(--jcmp-primary-hover-text, #fff);
}
.jcmp-btn-secondary {
    background: var(--jcmp-secondary-bg, #f3f4f6);
    color: var(--jcmp-secondary-text, #111827);
}
.jcmp-btn-secondary:hover {
    background: var(--jcmp-secondary-hover-bg, #e5e7eb);
    color: var(--jcmp-secondary-hover-text, #0f172a);
}
.jcmp-btn-danger {
    background: var(--jcmp-danger-bg, #fff1f2);
    color: var(--jcmp-danger-text, #be123c);
}
.jcmp-btn-danger:hover {
    background: var(--jcmp-danger-hover-bg, #ffe4e6);
    color: var(--jcmp-danger-hover-text, #9f1239);
}
.jcmp-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--jcmp-accent, #0F766E);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.jcmp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--jcmp-modal-overlay, rgba(15,23,42,.42));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: jcmp-fade-in .18s ease both;
}
.jcmp-modal {
    width: min(var(--jcmp-modal-width, 760px), calc(100vw - 32px));
    max-height: min(780px, calc(100vh - 32px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--jcmp-radius, 24px);
    background: var(--jcmp-modal-bg, #fff);
    color: var(--jcmp-text, #111827);
    box-shadow: 0 28px 70px rgba(15, 23, 42, .25);
    border: var(--jcmp-border-width, 1px) solid var(--jcmp-border, #e5e7eb);
}
.jcmp-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: var(--jcmp-modal-padding, 22px) var(--jcmp-modal-padding, 22px) calc(var(--jcmp-modal-padding, 22px) - 6px);
    border-bottom: 1px solid var(--jcmp-border, #e5e7eb);
}
.jcmp-modal-header h3 {
    margin: 0 0 6px;
    font-size: var(--jcmp-title-size, 18px);
    font-weight: var(--jcmp-title-weight, 900);
}
.jcmp-modal-header p {
    margin: 0;
    font-size: var(--jcmp-body-size, 13px);
    color: var(--jcmp-muted, #6b7280);
}
.jcmp-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    background: var(--jcmp-secondary-bg, #f3f4f6);
    color: var(--jcmp-secondary-text, #111827);
    font-size: 20px;
    cursor: pointer;
}
.jcmp-modal-body {
    padding: calc(var(--jcmp-modal-padding, 22px) - 4px) var(--jcmp-modal-padding, 22px);
    overflow: auto;
}
.jcmp-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: var(--jcmp-category-padding, 16px);
    border: 1px solid var(--jcmp-border, #e5e7eb);
    border-radius: var(--jcmp-category-radius, 18px);
    margin-bottom: 12px;
    background: var(--jcmp-category-bg, #f8fafc);
}
.jcmp-category-row h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 900;
    color: var(--jcmp-text, #111827);
}
.jcmp-category-row p {
    margin: 0;
    color: var(--jcmp-muted, #6b7280);
    font-size: 12px;
}
.jcmp-switch {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: var(--jcmp-switch-width, 52px);
    height: var(--jcmp-switch-height, 30px);
    cursor: pointer;
    user-select: none;
}
.jcmp-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}
.jcmp-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--jcmp-switch-off, #cbd5e1);
    border-radius: 999px;
    transition: .2s;
}
.jcmp-slider:before {
    position: absolute;
    content: "";
    height: calc(var(--jcmp-switch-height, 30px) - 6px);
    width: calc(var(--jcmp-switch-height, 30px) - 6px);
    right: 3px;
    bottom: 3px;
    background: var(--jcmp-switch-knob, #fff);
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.jcmp-root[data-direction="ltr"] .jcmp-slider:before,
html[dir="ltr"] .jcmp-slider:before {
    right: auto;
    left: 3px;
}
.jcmp-switch input:checked + .jcmp-slider {
    background: var(--jcmp-accent, #0F766E);
}
.jcmp-switch input:checked + .jcmp-slider:before {
    transform: translateX(calc((var(--jcmp-switch-width, 52px) - var(--jcmp-switch-height, 30px)) * -1));
}
.jcmp-root[data-direction="ltr"] .jcmp-switch input:checked + .jcmp-slider:before,
html[dir="ltr"] .jcmp-switch input:checked + .jcmp-slider:before {
    transform: translateX(calc(var(--jcmp-switch-width, 52px) - var(--jcmp-switch-height, 30px)));
}
.jcmp-switch input:disabled + .jcmp-slider {
    cursor: not-allowed;
    opacity: .75;
}
.jcmp-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--jcmp-actions-gap, 10px);
    padding: calc(var(--jcmp-modal-padding, 22px) - 6px) var(--jcmp-modal-padding, 22px) var(--jcmp-modal-padding, 22px);
    border-top: 1px solid var(--jcmp-border, #e5e7eb);
}
.jcmp-floating-button,
.jcmp-open-settings-shortcode {
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
    border: 0;
    border-radius: var(--jcmp-floating-radius, 999px);
    background: var(--jcmp-floating-bg, #0F766E);
    color: var(--jcmp-floating-text, #fff);
    padding: var(--jcmp-floating-py, 11px) var(--jcmp-floating-px, 15px);
    font-size: var(--jcmp-button-size, 13px);
    font-weight: var(--jcmp-button-weight, 850);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.jcmp-floating-button:hover,
.jcmp-open-settings-shortcode:hover {
    background: var(--jcmp-floating-hover-bg, #115e59);
    color: var(--jcmp-floating-hover-text, #fff);
    transform: translateY(-1px);
}
.jcmp-floating-button {
    position: fixed;
    z-index: 999998;
    right: var(--jcmp-floating-side-offset, 18px);
    bottom: var(--jcmp-floating-bottom, 18px);
    display: none;
}
.jcmp-floating-button.is-visible {
    display: inline-flex;
}
.jcmp-blocked-placeholder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 22px;
    border: 1px dashed var(--jcmp-border, #e5e7eb);
    border-radius: var(--jcmp-category-radius, 18px);
    background: var(--jcmp-category-bg, #f8fafc);
    color: var(--jcmp-muted, #6b7280);
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
    text-align: center;
}
.jcmp-blocked-placeholder button {
    border: 0;
    border-radius: var(--jcmp-button-radius, 12px);
    background: var(--jcmp-secondary-bg, #f3f4f6);
    color: var(--jcmp-secondary-text, #111827);
    padding: 10px 14px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}
.jcmp-policy {
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
    line-height: 2;
}
@keyframes jcmp-slide-up {
    from { transform: translateY(18px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes jcmp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (max-width: 720px) {
    .jcmp-consent-shell { padding: 10px; }
    .jcmp-banner-inner,
    .jcmp-root[data-layout="bar"] .jcmp-banner-inner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px;
    }
    .jcmp-icon { width: 42px; height: 42px; border-radius: 15px; }
    .jcmp-root[data-layout="bar"] .jcmp-actions,
    .jcmp-actions {
        min-width: 0;
        justify-content: stretch;
    }
    .jcmp-btn { flex: 1 1 100%; }
    .jcmp-modal-header,
    .jcmp-modal-body,
    .jcmp-modal-footer { padding-inline: 16px; }
    .jcmp-category-row { grid-template-columns: 1fr; }
    .jcmp-floating-button { right: 12px; bottom: 12px; }
}


/* v1.2.0: stronger theme-safe button colors */
#jcmp-root .jcmp-btn {
    border-style: solid !important;
    border-width: 1px !important;
    text-decoration: none !important;
    outline: none !important;
}
#jcmp-root .jcmp-btn-primary {
    background: var(--jcmp-primary-bg, var(--jcmp-accent, #0F766E)) !important;
    color: var(--jcmp-primary-text, var(--jcmp-accent-text, #fff)) !important;
    border-color: var(--jcmp-primary-border, var(--jcmp-primary-bg, #0F766E)) !important;
}
#jcmp-root .jcmp-btn-primary:hover,
#jcmp-root .jcmp-btn-primary:focus {
    background: var(--jcmp-primary-hover-bg, #115e59) !important;
    color: var(--jcmp-primary-hover-text, #fff) !important;
    border-color: var(--jcmp-primary-hover-border, var(--jcmp-primary-hover-bg, #115e59)) !important;
}
#jcmp-root .jcmp-btn-secondary {
    background: var(--jcmp-secondary-bg, #f3f4f6) !important;
    color: var(--jcmp-secondary-text, #111827) !important;
    border-color: var(--jcmp-secondary-border, #e5e7eb) !important;
}
#jcmp-root .jcmp-btn-secondary:hover,
#jcmp-root .jcmp-btn-secondary:focus {
    background: var(--jcmp-secondary-hover-bg, #e5e7eb) !important;
    color: var(--jcmp-secondary-hover-text, #0f172a) !important;
    border-color: var(--jcmp-secondary-hover-border, #cbd5e1) !important;
}
#jcmp-root .jcmp-btn-danger {
    background: var(--jcmp-danger-bg, #fff1f2) !important;
    color: var(--jcmp-danger-text, #be123c) !important;
    border-color: var(--jcmp-danger-border, #fecdd3) !important;
}
#jcmp-root .jcmp-btn-danger:hover,
#jcmp-root .jcmp-btn-danger:focus {
    background: var(--jcmp-danger-hover-bg, #ffe4e6) !important;
    color: var(--jcmp-danger-hover-text, #9f1239) !important;
    border-color: var(--jcmp-danger-hover-border, #fda4af) !important;
}
#jcmp-root .jcmp-floating-button,
.jcmp-open-settings-shortcode {
    background: var(--jcmp-floating-bg, #0F766E) !important;
    color: var(--jcmp-floating-text, #fff) !important;
    border: 1px solid var(--jcmp-floating-border, var(--jcmp-floating-bg, #0F766E)) !important;
}
#jcmp-root .jcmp-floating-button:hover,
#jcmp-root .jcmp-floating-button:focus,
.jcmp-open-settings-shortcode:hover,
.jcmp-open-settings-shortcode:focus {
    background: var(--jcmp-floating-hover-bg, #115e59) !important;
    color: var(--jcmp-floating-hover-text, #fff) !important;
    border-color: var(--jcmp-floating-hover-border, var(--jcmp-floating-hover-bg, #115e59)) !important;
}
#jcmp-root .jcmp-close {
    background: var(--jcmp-secondary-bg, #f3f4f6) !important;
    color: var(--jcmp-secondary-text, #111827) !important;
}

/* v1.3.0 policy table */
.jcmp-policy-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--jcmp-border, #e5e7eb);
    border-radius: 18px;
}
.jcmp-policy-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
}
.jcmp-policy-table th,
.jcmp-policy-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--jcmp-border, #e5e7eb);
    text-align: var(--jcmp-text-align, justify);
    text-align-last: var(--jcmp-text-align-last, right);
    vertical-align: top;
}
.jcmp-policy-table th {
    background: var(--jcmp-category-bg, #f8fafc);
    color: var(--jcmp-text, #111827);
    font-weight: 900;
}
.jcmp-policy-table td {
    color: var(--jcmp-muted, #6b7280);
}
.jcmp-policy-table code {
    direction: ltr;
    display: inline-block;
    background: var(--jcmp-secondary-bg, #f3f4f6);
    color: var(--jcmp-text, #111827);
    padding: 3px 8px;
    border-radius: 8px;
}

.jcmp-do-not-sell,
.jcmp-debug-status {
    font-family: var(--jcmp-font, Tahoma, Arial, sans-serif);
    direction: rtl;
    text-align: right;
    border: 1px solid var(--jcmp-border, #e5e7eb);
    background: var(--jcmp-bg-rgba, rgba(255,255,255,.92));
    color: var(--jcmp-text, #111827);
    border-radius: var(--jcmp-radius, 20px);
    padding: 20px;
    box-shadow: 0 18px 40px rgba(15,23,42,.08);
    margin: 18px 0;
}
.jcmp-do-not-sell h3,
.jcmp-debug-status h3 {
    margin: 0 0 8px;
    font-size: var(--jcmp-title-size, 18px);
    font-weight: var(--jcmp-title-weight, 900);
}
.jcmp-do-not-sell p,
.jcmp-debug-status p {
    margin: 0 0 14px;
    color: var(--jcmp-muted, #6b7280);
    font-size: var(--jcmp-body-size, 13px);
}
.jcmp-optout-result {
    display: inline-flex;
    margin-inline-start: 10px;
    color: var(--jcmp-accent, #0F766E);
    font-weight: 800;
    font-size: 13px;
}
.jcmp-debug-status table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.jcmp-debug-status th,
.jcmp-debug-status td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--jcmp-border, #e5e7eb);
    text-align: right;
}
.jcmp-debug-status th {
    width: 220px;
    color: var(--jcmp-muted, #6b7280);
}
