/* Cryptoniq Options Framework */

.cryptoniq-options-wrap {
    position: relative;
    margin: 20px 20px 40px 0;
    font-size: 14px;
    color: #1d2327;
}

.cryptoniq-options-wrap *,
.cryptoniq-options-wrap *::before,
.cryptoniq-options-wrap *::after {
    box-sizing: border-box;
}

.cryptoniq-options-wrap a {
    color: #2c3a4a;
}

/* Header */
.cryptoniq-options-wrap .cn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1d2733;
    color: #fff;
    padding: 18px 24px;
    border-radius: 5px 5px 0 0;
    font-weight: 700;
}
.cryptoniq-options-wrap .cn-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cryptoniq-options-wrap .cn-header h1 {
    color: #fff;
    margin: 0;
    font-size: 16px;
    line-height: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cryptoniq-options-wrap .cn-version {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    color: #cbd5e1;
    border: 2px solid transparent;
    border-radius: 5px;
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.15)) border-box;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 26px;
}
.cryptoniq-options-wrap .cn-version i {
    padding-left: 2px;
    font-style: normal;
}

/* Mode badge — always-on indicator of Lite vs PRO, sits in the header
   title row next to the version pill. */
.cryptoniq-options-wrap .cn-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    line-height: 28px;
    text-transform: uppercase;
}
.cryptoniq-options-wrap .cn-mode-lite {
    color: #cbd5e1;
    border: 2px solid transparent;
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, rgba(148, 163, 184, 0.45), rgba(148, 163, 184, 0.20)) border-box;
}
.cryptoniq-options-wrap .cn-mode-pro {
    color: #fff;
    border: 2px solid transparent;
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #6366f1, #a855f7) border-box;
    box-shadow: 0 0 14px 0 rgba(168, 85, 247, 0.22);
}
.cryptoniq-options-wrap .cn-mode-icon {
    font-size: 12px;
    line-height: 1;
    /* The flash glyph is top-heavy in the Ionicons font; nudge down 1px so
       it sits at the optical center next to the "PRO" text. */
    transform: translateY(1px);
}
.cryptoniq-options-wrap .cn-header-extra {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toast notice — sits inside the header on the right, auto-dismisses.
   Same gradient family as the license pill so it feels native. */
.cryptoniq-options-wrap .cn-toast {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 26px;
    pointer-events: none;
    animation: cn-toast-in 220ms ease-out;
}
.cryptoniq-options-wrap .cn-toast.is-hiding {
    animation: cn-toast-out 240ms ease-in forwards;
}
.cryptoniq-options-wrap .cn-toast-success {
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #22c55e, #15803d) border-box;
    box-shadow: 0 0 14px 0 rgba(34, 197, 94, 0.20);
}
.cryptoniq-options-wrap .cn-toast-error {
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #ef4444, #dc2626) border-box;
    box-shadow: 0 0 14px 0 rgba(239, 68, 68, 0.20);
}
.cryptoniq-options-wrap .cn-toast-icon {
    font-size: 12px;
    line-height: 1;
}

@keyframes cn-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cn-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* Layout */
.cryptoniq-options-wrap .cn-layout {
    display: flex;
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 5px 5px;
    min-height: 700px;
    overflow: hidden;
}

/* Tabs */
.cryptoniq-options-wrap .cn-tabs {
    width: 200px;
    flex: 0 0 200px;
    background: #2c3a4a;
    padding: 15px 0;
    border-right: 1px solid #1d2733;
}
.cryptoniq-options-wrap .cn-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #c5d1de;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    border-left: 3px solid transparent;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cryptoniq-options-wrap .cn-tab:focus,
.cryptoniq-options-wrap .cn-tab:focus-visible {
    outline: none;
    box-shadow: none;
}
.cryptoniq-options-wrap .cn-tab:hover {
    background: #34455a;
    color: #fff;
}
.cryptoniq-options-wrap .cn-tab.is-active {
    background: #1d2733;
    color: #fff;
    border-left-color: #2271b1;
}
/* When the tab's panel contains a validation error (e.g. an invalid wallet
   address), show a red dot in the tab so the user sees the problem source
   even from another tab. JS toggles .has-error on/off in real time. */
.cryptoniq-options-wrap .cn-tab.has-error {
    color: #ffb4b6;
}
.cryptoniq-options-wrap .cn-tab.has-error::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-radius: 50%;
    background: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.25);
    flex-shrink: 0;
}
.cryptoniq-options-wrap .cn-tab.has-error.is-active {
    color: #fff;
}
.cryptoniq-options-wrap .cn-tab-icon {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

/* Panels */
.cryptoniq-options-wrap .cn-panels {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.cryptoniq-options-wrap .cn-panel {
    display: none;
    padding: 24px 28px;
    flex: 1;
}
.cryptoniq-options-wrap .cn-panel.is-active { display: block; }
.cryptoniq-options-wrap .cn-panel-head {
    border-bottom: 1px solid #e0e3e7;
    padding-bottom: 14px;
    margin-bottom: 20px;
}
.cryptoniq-options-wrap .cn-panel-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
}
.cryptoniq-options-wrap .cn-panel-desc {
    margin: 0;
    color: #50575e;
    font-size: 13px;
}

/* Wallet-cap counter chip (rendered inline in the Wallets-tab desc) */
.cryptoniq-options-wrap .cn-wallet-counter {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    margin-left: 8px;
    background: #1d2733;
    color: #fff;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 22px;
}
.cryptoniq-options-wrap .cn-wallet-counter.is-full {
    background: #d63638;
}

/* Disabled state for Add button when the wallet cap is reached */
.cryptoniq-options-wrap .cn-btn[disabled],
.cryptoniq-options-wrap .cn-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

/* Field row */
.cryptoniq-options-wrap .cn-field {
    display: flex;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid #f0f1f3;
}
.cryptoniq-options-wrap .cn-field:last-child { border-bottom: 0; }
.cryptoniq-options-wrap .cn-field-label {
    width: 260px;
    flex: 0 0 260px;
}
.cryptoniq-options-wrap .cn-field-label label {
    font-weight: 700;
    color: #1d2327;
    display: block;
    margin-bottom: 4px;
}
.cryptoniq-options-wrap .cn-field-sub {
    margin: 0;
    color: #646970;
    font-size: 12.5px;
    line-height: 1.5;
}
.cryptoniq-options-wrap .cn-field-input { flex: 1; min-width: 0; }
.cryptoniq-options-wrap .cn-field-desc {
    margin: 8px 0 0;
    color: #646970;
    font-size: 12.5px;
}
.cryptoniq-options-wrap .cn-field-error {
    margin: 8px 0 0;
    color: #d63638;
    font-size: 12.5px;
    font-weight: 7;
}
.cryptoniq-options-wrap .cn-field.has-error .cn-input { border-color: #d63638; }
.cryptoniq-options-wrap .cn-field.is-hidden { display: none; }

/* Locked field — PRO-only feature in lite mode.
   Dims the underlying inputs and overlays a centered "Available in PRO" badge.
   Server-side, the save handler skips locked fields so values can't be
   smuggled in via a tampered form. */
.cryptoniq-options-wrap .cn-field-locked .cn-field-input {
    position: relative;
    min-height: 36px;
}
.cryptoniq-options-wrap .cn-field-locked .cn-field-input > *:not(.cn-field-locked-overlay) {
    opacity: 0.4;
    filter: grayscale(0.6);
    pointer-events: none;
    user-select: none;
}
.cryptoniq-options-wrap .cn-field-locked-overlay {
    position: absolute;
    inset: -6px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.78) 100%);
    pointer-events: auto;
    border-radius: 4px;
}
.cryptoniq-options-wrap .cn-field-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #1d2327;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.cryptoniq-options-wrap .cn-field-locked-badge i {
    font-size: 14px;
}
.cryptoniq-options-wrap .cn-field-locked .cn-field-label label {
    color: #646970; /* slightly dimmed title to hint it's locked */
}

/* Inputs */
.cryptoniq-options-wrap .cn-input {
    width: 100%;
    max-width: 460px;
    padding: 0px 15px;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    line-height: 36px;
    height: 36px;
	min-height: 36px;
    color: #1d2327;
    margin: 0 !important;
}
.cryptoniq-options-wrap .cn-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: none;
}
.cryptoniq-options-wrap .cn-input-textarea { max-width: 700px; min-height: 90px; resize: vertical; }
.cryptoniq-options-wrap .cn-input-select { max-width: 320px; }

/* Checkbox group */
.cryptoniq-options-wrap .cn-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.cryptoniq-options-wrap .cn-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #f6f7f7;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
}
.cryptoniq-options-wrap .cn-checkbox-item:hover { border-color: #8c8f94; }
.cryptoniq-options-wrap .cn-checkbox-item input[type="checkbox"] { margin: 0; }
.cryptoniq-options-wrap .cn-checkbox-item input[type="checkbox"]:checked + .cn-checkbox-label { color: #2271b1; font-weight: 700; }

/* Switch */
.cryptoniq-options-wrap .cn-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.cryptoniq-options-wrap .cn-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cryptoniq-options-wrap .cn-switch-track {
    width: 42px;
    height: 22px;
    background: #b4b9be;
    border-radius: 11px;
    position: relative;
    transition: background 0.15s;
}
.cryptoniq-options-wrap .cn-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.cryptoniq-options-wrap .cn-switch.is-on .cn-switch-track { background: #2c3a4a; }
.cryptoniq-options-wrap .cn-switch.is-on .cn-switch-thumb { left: 22px; }
.cryptoniq-options-wrap .cn-switch-text { font-size: 13px; color: #50575e; }
.cryptoniq-options-wrap .cn-switch .cn-switch-on  { display: none; }
.cryptoniq-options-wrap .cn-switch .cn-switch-off { display: inline; }
.cryptoniq-options-wrap .cn-switch.is-on .cn-switch-on  { display: inline; color: #2c3a4a; font-weight: 700; }
.cryptoniq-options-wrap .cn-switch.is-on .cn-switch-off { display: none; }

/* Multi-text */
.cryptoniq-options-wrap .cn-multitext-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}
.cryptoniq-options-wrap .cn-multitext-row {
    display: flex;
    gap: 5px;
    align-items: center;
}
.cryptoniq-options-wrap .cn-multitext-input { max-width: 460px; }

/* Duplicate-row indicator. The JS adds .is-duplicate to repeat entries
   within a multi-text field marked data-unique="1". Server-side dedupe
   strips these on save; this is just instant visual feedback. */
.cryptoniq-options-wrap .cn-multitext-row.is-duplicate,
.cryptoniq-options-wrap .cn-multitext-row.is-invalid {
    position: relative;
}
.cryptoniq-options-wrap .cn-multitext-row.is-duplicate .cn-multitext-input,
.cryptoniq-options-wrap .cn-multitext-row.is-invalid .cn-multitext-input {
    border-color: #d63638;
    background: #fcefef;
}
.cryptoniq-options-wrap .cn-multitext-row.is-duplicate::after,
.cryptoniq-options-wrap .cn-multitext-row.is-invalid::after {
    position: absolute;
    right: 50px; /* sits to the left of the remove × button */
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #d63638;
    background: #fff;
    padding: 0 6px;
    pointer-events: none;
}
.cryptoniq-options-wrap .cn-multitext-row.is-duplicate::after { content: "Duplicate"; }
.cryptoniq-options-wrap .cn-multitext-row.is-invalid::after   { content: "Invalid format"; }
/* When a row is BOTH invalid and duplicate, prefer "Invalid format" */
.cryptoniq-options-wrap .cn-multitext-row.is-invalid.is-duplicate::after { content: "Invalid format"; }

/* Remove-row "×" — plain Unicode multiplication sign (U+00D7).
   Font-independent so it renders even if Ionicons doesn't load on the
   admin page, and the glyph is universally available in every system font.
   line-height matches the 36px button height for vertical centering;
   margin-top compensates for the glyph's natural baseline offset. */
.cryptoniq-options-wrap .cn-multitext-remove::after {
    content: "\00d7";
    font-family: inherit;
    font-weight: 700;
    font-style: normal;
    font-size: 15px;
    line-height: 36px;
    margin-top: -3px;
}

/* ============================================================
   Framework button system — replaces WordPress `.button` styles.
   Variants:
     .cn-btn-primary    — strong call-to-action (Save)
     .cn-btn-secondary  — neutral (Add row, etc.)
     .cn-btn-danger     — destructive (Remove)
     .cn-btn-icon       — square icon-only button (combine with a variant)
   ============================================================ */
.cryptoniq-options-wrap .cn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    padding: 0 15px;
    margin: 0;
    background: #fff;
    color: #1d2327;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 36px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.cryptoniq-options-wrap .cn-btn:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
}
.cryptoniq-options-wrap .cn-btn:focus,
.cryptoniq-options-wrap .cn-btn:focus-visible {
    outline: none;
    border-color: #2271b1;
    box-shadow: none;
}
.cryptoniq-options-wrap .cn-btn:active {
    transform: translateY(1px);
}
.cryptoniq-options-wrap .cn-btn[disabled],
.cryptoniq-options-wrap .cn-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Primary */
.cryptoniq-options-wrap .cn-btn-primary {
    background: #34455a;
    color: #fff;
    border-color: #1d2733;
}
.cryptoniq-options-wrap .cn-btn-primary:hover {
    background: #2c3a4a;
    border-color: #1d2733;
}

/* Secondary (default look, just clearer hover) */
.cryptoniq-options-wrap .cn-btn-secondary {
    color: #2c3a4a;
    border-color: #c3c4c7;
}
.cryptoniq-options-wrap .cn-btn-secondary:hover {
    color: #1d2733;
    border-color: #1d2733;
}

/* Danger */
.cryptoniq-options-wrap .cn-btn-danger {
    color: #d63638;
    border-color: #d63638;
    background: #fff;
}
.cryptoniq-options-wrap .cn-btn-danger:hover {
    background: #ba3739;
    color: #fff;
    border-color: #852324;
}

/* Icon-only square. The parent .cn-btn is already inline-flex with
   align-items:center (vertical). We add justify-content:center here so any
   glyph or pseudo-element content sits in the geometric middle on both
   axes — no margin nudging needed for individual icons. */
.cryptoniq-options-wrap .cn-btn-icon {
    width: 36px;
    padding: 0;
    font-size: 16px;
    justify-content: center;
}

/* Inline leading icon (icon + text inside a button) */
.cryptoniq-options-wrap .cn-btn-icon-lead {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
}

/* ============================================================
   Panel content blocks (rich HTML inside a section, e.g. comparison
   tables, upsell cards). Renders below the section head and above
   any fields. Trusted markup filtered through wp_kses_post.
   ============================================================ */
.cryptoniq-options-wrap .cn-panel-content {
    margin-top: 8px;
}

/* Lite vs PRO comparison table */
.cryptoniq-options-wrap .cn-compare {
    max-width: 900px;
}
.cryptoniq-options-wrap .cn-compare-table {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.cryptoniq-options-wrap .cn-compare-head,
.cryptoniq-options-wrap .cn-compare-row,
.cryptoniq-options-wrap .cn-compare-foot {
    display: contents;
}

.cryptoniq-options-wrap .cn-compare-cell {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f1f3;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #1d2327;
    min-height: 50px;
    box-sizing: border-box;
}

/* Feature label column (leftmost) */
.cryptoniq-options-wrap .cn-cmp-feature {
    font-weight: 600;
    background: #f6f7f7;
    border-right: 1px solid #e0e3e7;
}

/* PRO column highlight — subtle blue tint, gives it the "premium" feel */
.cryptoniq-options-wrap .cn-cmp-pro {
    background: linear-gradient(180deg, #f3f9ff, #fff);
    border-left: 1px solid #e0e3e7;
}

/* Header row */
.cryptoniq-options-wrap .cn-compare-head .cn-compare-cell {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    background: #1d2733;
    color: #fff;
    border-bottom: 0;
    min-height: 78px;
}
.cryptoniq-options-wrap .cn-compare-head .cn-cmp-feature {
    background: #1d2733;
    border-right-color: #2c3a4a;
}
.cryptoniq-options-wrap .cn-compare-head .cn-cmp-pro {
    background: linear-gradient(180deg, #2271b1, #135e96);
    border-left-color: transparent;
}
.cryptoniq-options-wrap .cn-cmp-plan {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cryptoniq-options-wrap .cn-cmp-price {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

/* Footer row — actions */
.cryptoniq-options-wrap .cn-compare-foot .cn-compare-cell {
    border-bottom: 0;
    padding: 18px;
    background: #fafbfc;
    justify-content: center;
}
.cryptoniq-options-wrap .cn-compare-foot .cn-cmp-feature {
    background: #f6f7f7;
}
.cryptoniq-options-wrap .cn-compare-foot .cn-cmp-pro {
    background: linear-gradient(180deg, #fff, #f3f9ff);
}

/* Yes / No icons */
.cryptoniq-options-wrap .cn-cmp-yes,
.cryptoniq-options-wrap .cn-cmp-no {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
}
.cryptoniq-options-wrap .cn-cmp-yes {
    background: rgba(0, 163, 42, 0.12);
    color: #00a32a;
}
.cryptoniq-options-wrap .cn-cmp-no {
    background: rgba(214, 54, 56, 0.10);
    color: #d63638;
}

/* Tags ("Active" / "You are here") */
.cryptoniq-options-wrap .cn-cmp-tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e0e3e7;
    color: #50575e;
    border-radius: 5px;
}
.cryptoniq-options-wrap .cn-cmp-tag-current {
    background: #00a32a;
    color: #fff;
}

/* Upgrade CTA */
.cryptoniq-options-wrap .cn-cmp-cta {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
}

/* Responsive: stack PRO/Lite under feature on narrow screens */
@media (max-width: 720px) {
    .cryptoniq-options-wrap .cn-compare-table {
        grid-template-columns: 1fr 1fr;
    }
    .cryptoniq-options-wrap .cn-cmp-feature {
        grid-column: 1 / -1;
        background: #1d2733 !important;
        color: #fff;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-height: 36px;
        border-right: 0;
    }
}

/* Footer */
.cryptoniq-options-wrap .cn-footer {
    padding: 18px 28px;
    background: #f6f7f7;
    border-top: 1px solid #e0e3e7;
    text-align: right;
}
.cryptoniq-options-wrap .cn-save {
    height: 36px;
    padding: 0px 15px;
    font-size: 14px;
    line-height: 36px;
}

/* Color picker tweak — keep within max-width */
.cryptoniq-options-wrap .wp-picker-container { display: inline-block; }

/* ============================================================
   image_select field — picture-style multi-choice
   Each option carries its own image (and optional corner badge),
   so there are no per-plugin/per-key CSS hacks.
   ============================================================ */

.cryptoniq-options-wrap .cn-image-select {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.cryptoniq-options-wrap .cn-image-select.has-columns {
    display: grid !important;
    grid-template-columns: repeat(var(--cn-cols, 6), minmax(0, 1fr));
    max-width: 480px;
}

.cryptoniq-options-wrap .cn-image-option {
    box-sizing: border-box !important;
    width: 48px !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
    background-color: #fff;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 70% 70% !important;
    border: 1px solid #dcdcde !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 80ms ease;
}
.cryptoniq-options-wrap .cn-image-option:hover {
    border-color: #8c8f94 !important;
}
.cryptoniq-options-wrap .cn-image-option:active {
    transform: scale(0.97);
}

/* Visually hide the checkbox but keep it rendered, so label-click forwarding
   and `change` events fire reliably across browsers. Using display:none here
   breaks deselect in some setups because the change event doesn't dispatch. */
.cryptoniq-options-wrap .cn-image-option input[type="checkbox"],
.cryptoniq-options-wrap .cn-image-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
}

/* Checked state — :has() for modern browsers, .is-checked fallback */
.cryptoniq-options-wrap .cn-image-option:has(input:checked),
.cryptoniq-options-wrap .cn-image-option.is-checked {
    background-color: #f7f7f7;
    box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px #2c3a4a;
}

/* Locked state — PRO-only option in free mode */
.cryptoniq-options-wrap .cn-image-option.is-locked {
    cursor: not-allowed !important;
    filter: grayscale(0.8) opacity(0.55);
    /* Suppress hover/checked styles below */
}
.cryptoniq-options-wrap .cn-image-option.is-locked:hover {
    border-color: #dcdcde !important; /* don't darken on hover */
}
.cryptoniq-options-wrap .cn-image-option.is-locked:has(input:checked),
.cryptoniq-options-wrap .cn-image-option.is-locked.is-checked {
    background-color: #fff !important;
    box-shadow: none !important;
}
/* Lock badge — top-LEFT so it coexists with chain-badge in top-right */
.cryptoniq-options-wrap .cn-image-option-lock {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d2327;
    color: #fff;
    border-radius: 5px 0 5px 0;
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
    /* The icon comes from Ionicons via <i class="ion-md-lock"> */
}

/* Corner badge (e.g. chain icon on a stablecoin) */
.cryptoniq-options-wrap .cn-image-option-badge {
    content: "" !important;
    position: absolute !important;
    top: -1px !important;
    right: -1px !important;
    width: 22px !important;
    height: 22px !important;
    background-color: #fff !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 70% 70% !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0 !important;
    pointer-events: none;
    text-indent: 0;
}

/* Tooltip (label that appears above the icon on hover) */
.cryptoniq-options-wrap .cn-image-option-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 7px 11px;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    text-indent: 0;
    z-index: 10;
    transition: opacity 120ms ease, transform 120ms ease;
}
.cryptoniq-options-wrap .cn-image-option-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #000;
}
.cryptoniq-options-wrap .cn-image-option:hover .cn-image-option-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* License status pill in header — dark interior with gradient border.
   Each .status-* variant supplies its own colored gradient + soft halo. */
.cryptoniq-options-wrap #cryptoniq-topbar-widget {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 12px;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 26px;
}
.cryptoniq-options-wrap #cryptoniq-topbar-widget i {
    font-size: 12px;
    line-height: 1;
}
.cryptoniq-options-wrap #cryptoniq-topbar-widget.status-blue {
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #3b82f6, #2563eb) border-box;
    box-shadow: 0 0 14px 0 rgba(59, 130, 246, 0.20);
}
.cryptoniq-options-wrap #cryptoniq-topbar-widget.status-green {
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #22c55e, #15803d) border-box;
    box-shadow: 0 0 14px 0 rgba(34, 197, 94, 0.18);
}
.cryptoniq-options-wrap #cryptoniq-topbar-widget.status-red {
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        linear-gradient(135deg, #ef4444, #dc2626) border-box;
    box-shadow: 0 0 14px 0 rgba(239, 68, 68, 0.18);
}

.cryptoniq-options-link {
    font-weight: 700;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
    .cryptoniq-options-wrap .cn-layout { flex-direction: column; }
    .cryptoniq-options-wrap .cn-tabs {
        width: 100%;
        flex: 0 0 auto;
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    .cryptoniq-options-wrap .cn-tab {
        border-left: 0;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .cryptoniq-options-wrap .cn-tab.is-active {
        border-left-color: transparent;
        border-bottom-color: #2271b1;
    }
    .cryptoniq-options-wrap .cn-field { flex-direction: column; gap: 8px; }
    .cryptoniq-options-wrap .cn-field-label { width: 100%; flex: none; }
}
