/* WordPress Admin Overrides */
body.settings_page_anchorkit-settings {
    background-color: #EEF0F5;
}

body.settings_page_anchorkit-settings #wpcontent {
    padding-left: 0;
    background-color: #EEF0F5;
    overflow: visible;
    /* Prevent clipping of elevated tabs on hover */
}

body.settings_page_anchorkit-settings .wrap {
    margin: 0;
    padding: 0 1rem;
    /* Add padding on the sides */
    overflow: visible;
    /* Prevent clipping of elevated tabs on hover */
}

/* Override WordPress core nav-tab-wrapper border */
body.settings_page_anchorkit-settings .nav-tab-wrapper {
    border-bottom: none;
    background-color: #EEF0F5;
    padding: 0;
    overflow: visible;
    /* Prevent clipping of elevated tabs on hover */
}

/* Tabs Dropdown for Mobile View */
.anchorkit-tabs-dropdown {
    display: none;
    position: relative;
    margin: 8px -8px;
    min-width: 100%;
    z-index: 100;
    /* Kept moderate z-index */
}

.anchorkit-tabs-dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background-color: var(--anchorkit-tab-bg, #fff);
    border: 1px solid var(--anchorkit-tab-border, #ccc);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    color: var(--anchorkit-tab-fg, inherit);
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Add icon display for dropdown button */
.anchorkit-tabs-dropdown-button img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Add gap between icon and text */
.anchorkit-tabs-dropdown-button .dropdown-tab-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.anchorkit-tabs-dropdown-button svg {
    transition: transform 0.2s ease;
}

.anchorkit-tabs-dropdown.open .anchorkit-tabs-dropdown-button svg {
    transform: rotate(180deg);
}

.anchorkit-tabs-dropdown.open .anchorkit-tabs-dropdown-button {
    background-color: var(--anchorkit-tab-open-bg, var(--anchorkit-tab-bg, #fff));
    color: var(--anchorkit-tab-open-fg, var(--anchorkit-tab-fg, inherit));
}

.anchorkit-tabs-dropdown.open .anchorkit-tabs-dropdown-button img {
    filter: brightness(0) invert(1);
    /* Make white */
    opacity: 1;
}

.anchorkit-tabs-dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    display: none;
    position: absolute;
    top: 100%;
    margin: 0;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    /* Reduced from 12000 to ensure it doesn't overlap WordPress UI */
    list-style: none;
}

.anchorkit-tabs-dropdown.open .anchorkit-tabs-dropdown-menu {
    display: block;
}

.anchorkit-tabs-dropdown-menu li {
    margin: 0;
}

.anchorkit-tabs-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #1d2327;
    transition: background-color 0.2s ease;
}

.anchorkit-tabs-dropdown-menu a.active {
    background-color: #f0f0f1;
    font-weight: 500;
}

.anchorkit-tabs-dropdown-menu a:hover {
    background-color: #f6f7f7;
}

.anchorkit-tabs-dropdown-menu a img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.anchorkit-tabs-dropdown-menu li:last-child a {
    border-radius: 0 0 8px 8px;
}

/* Quick Start - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="quick-start"] {
    --anchorkit-tab-bg: #bbd0ff;
    --anchorkit-tab-fg: #1a237e;
    --anchorkit-tab-border: #3f51b5;
    --anchorkit-tab-open-bg: #3f51b5;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* Appearance & Behavior - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="appearance-behavior"] {
    --anchorkit-tab-bg: #c8c9ff;
    --anchorkit-tab-fg: #1a1f71;
    --anchorkit-tab-border: #5c6bc0;
    --anchorkit-tab-open-bg: #5c6bc0;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* Structure & SEO - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="structure-seo"] {
    --anchorkit-tab-bg: #d1c4e9;
    --anchorkit-tab-fg: #4a148c;
    --anchorkit-tab-border: #7b1fa2;
    --anchorkit-tab-open-bg: #7b1fa2;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* Advanced & Accessibility - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="advanced-accessibility"] {
    --anchorkit-tab-bg: #e1bee7;
    --anchorkit-tab-fg: #6a1b9a;
    --anchorkit-tab-border: #8e24aa;
    --anchorkit-tab-open-bg: #8e24aa;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* Help - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="help"] {
    --anchorkit-tab-bg: #e8eaf6;
    --anchorkit-tab-fg: #3f51b5;
    --anchorkit-tab-border: #673ab7;
    --anchorkit-tab-open-bg: #673ab7;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* AnchorKit Pro - active tab colors */
.anchorkit-tabs-dropdown-button[data-active-tab="anchorkit-pro"] {
    --anchorkit-tab-bg: #ede7f6;
    --anchorkit-tab-fg: #512da8;
    --anchorkit-tab-border: #9c27b0;
    --anchorkit-tab-open-bg: #9c27b0;
    --anchorkit-tab-open-fg: #FFFFFF;
}

/* Responsive styles for tabs/dropdown toggle */
@media screen and (max-width: 782px) {
    .anchorkit-tabs {
        display: none !important;
    }

    .anchorkit-tabs-dropdown {
        display: block !important;
    }

    .anchorkit-tab-content {
        margin-top: 0;
    }
}

/* The rest of your existing CSS follows below */
h2,
h3,
p {
    margin-bottom: 0.5rem;
    padding: 0;
}

.anchorkit-admin {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Helper text consistent styling - Material Design 3 compliant */
.helper-text,
.default-value {
    display: block;
    font-size: 0.8125rem;
    /* 13px - MD3 body-small */
    line-height: 1.5;
    color: #646970;
    /* Slightly lighter than labels */
    margin-top: 6px;
    margin-bottom: 0;
    /* Remove bottom margin for better grouping */
    margin-left: 0;
    /* Reset any indentation */
    letter-spacing: 0.01em;
    font-style: normal;
    /* Remove italic for better readability */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {

    .helper-text,
    .default-value {
        color: var(--md-sys-color-on-surface-variant, #424242);
    }
}

.default-value {
    font-size: 0.7rem;
    color: #777;
}

/* Header Section - Updated with lighter background */
.anchorkit-header-section {
    background: #EEF0F5;
    padding: 24px 8px 0;
    margin-bottom: 0;
    position: relative;
    z-index: 100 !important;
    /* Reduced from 13000 */
    overflow: visible;
    /* Prevent clipping of elevated tabs on hover */
}

/* Tab Navigation - Align with logo */
.anchorkit-tabs {
    display: flex;
    gap: 2px;
    /* Reduced gap for more compact layout */
    margin: 0;
    padding: 6px 0 0 16px;
    /* Increased top padding to accommodate hover elevation and shadow */
    background: #EEF0F5;
    border-bottom: none;
    margin-top: 16px;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: visible;
    /* Changed from hidden to visible to prevent clipping on hover elevation */
    scrollbar-width: thin;
    scrollbar-color: #ccd0d4 transparent;
}

.anchorkit-tabs::-webkit-scrollbar {
    height: 4px;
}

.anchorkit-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.anchorkit-tabs::-webkit-scrollbar-thumb {
    background: #ccd0d4;
    border-radius: 2px;
}

.anchorkit-tabs::-webkit-scrollbar-thumb:hover {
    background: #a0a5aa;
}

.anchorkit-tabs .nav-tab {
    padding: 10px 14px;
    /* Reduced padding for more compact tabs */
    font-size: 13px;
    /* Slightly smaller font */
    line-height: 1.4;
    border: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--anchorkit-tab-bg, transparent);
    color: var(--anchorkit-tab-fg, inherit);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reduced gap between icon and text */
    min-width: auto;
    /* Remove minimum width constraint */
    position: relative;
    font-weight: 500;
    z-index: 1;
    transform: translateY(0);
    flex-shrink: 0;
    /* Prevent tabs from shrinking */
    white-space: nowrap;
    /* Prevent text wrapping */
    overflow: visible;
    /* Ensure rounded corners and shadows aren't clipped */
    isolation: isolate;
    /* Create new stacking context to prevent clipping */
}

.anchorkit-tabs .nav-tab img {
    width: 16px;
    /* Reduced icon size for more compact tabs */
    height: 16px;
    display: block;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quick Start Tab - Deep Blue */
.anchorkit-tabs .nav-tab[href*="quick-start"] {
    --anchorkit-tab-bg: #bbd0ff;
    --anchorkit-tab-fg: #1a237e;
    --anchorkit-tab-active-bg: #3f51b5;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(63, 81, 181, 0.2);
    --anchorkit-tab-focus-outline: #3f51b5;
    --anchorkit-tab-focus-ring: rgba(63, 81, 181, 0.1);
}

/* Appearance & Behavior Tab - Indigo */
.anchorkit-tabs .nav-tab[href*="appearance-behavior"] {
    --anchorkit-tab-bg: #c8c9ff;
    --anchorkit-tab-fg: #1a1f71;
    --anchorkit-tab-active-bg: #5c6bc0;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(92, 107, 192, 0.2);
    --anchorkit-tab-focus-outline: #5c6bc0;
    --anchorkit-tab-focus-ring: rgba(92, 107, 192, 0.1);
}

/* Structure & SEO Tab - Deep Purple */
.anchorkit-tabs .nav-tab[href*="structure-seo"] {
    --anchorkit-tab-bg: #d1c4e9;
    --anchorkit-tab-fg: #4a148c;
    --anchorkit-tab-active-bg: #7b1fa2;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(123, 31, 162, 0.2);
    --anchorkit-tab-focus-outline: #7b1fa2;
    --anchorkit-tab-focus-ring: rgba(123, 31, 162, 0.1);
}

/* Advanced & Accessibility Tab - Violet Purple */
.anchorkit-tabs .nav-tab[href*="advanced-accessibility"] {
    --anchorkit-tab-bg: #e1bee7;
    --anchorkit-tab-fg: #6a1b9a;
    --anchorkit-tab-active-bg: #8e24aa;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(186, 104, 200, 0.25);
    --anchorkit-tab-focus-outline: #8e24aa;
    --anchorkit-tab-focus-ring: rgba(142, 36, 170, 0.1);
}

/* Help Tab - Blue Purple */
.anchorkit-tabs .nav-tab[href*="help"] {
    --anchorkit-tab-bg: #e8eaf6;
    --anchorkit-tab-fg: #3f51b5;
    --anchorkit-tab-active-bg: #673ab7;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(103, 58, 183, 0.2);
    --anchorkit-tab-focus-outline: #673ab7;
    --anchorkit-tab-focus-ring: rgba(103, 58, 183, 0.1);
}

/* AnchorKit Pro Tab - Violet */
.anchorkit-tabs .nav-tab[href*="anchorkit-pro"] {
    --anchorkit-tab-bg: #ede7f6;
    --anchorkit-tab-fg: #512da8;
    --anchorkit-tab-active-bg: #9c27b0;
    --anchorkit-tab-active-fg: #FFFFFF;
    --anchorkit-tab-hover-shadow: 0 4px 8px rgba(156, 39, 176, 0.2);
    --anchorkit-tab-focus-outline: #9c27b0;
    --anchorkit-tab-focus-ring: rgba(156, 39, 176, 0.1);
}

.anchorkit-tabs .nav-tab:hover {
    background-color: var(--anchorkit-tab-active-bg, var(--anchorkit-tab-bg, transparent));
    color: var(--anchorkit-tab-active-fg, var(--anchorkit-tab-fg, inherit));
    transform: translateY(-2px);
    box-shadow: var(--anchorkit-tab-hover-shadow, 0 4px 8px rgba(0, 0, 0, 0.1));
    z-index: 10;
    /* Higher z-index on hover to prevent clipping */
}

/* Active tab styles */
.anchorkit-tabs .nav-tab[href*="quick-start"].nav-tab-active,
.anchorkit-tabs .nav-tab[href*="appearance-behavior"].nav-tab-active,
.anchorkit-tabs .nav-tab[href*="structure-seo"].nav-tab-active,
.anchorkit-tabs .nav-tab[href*="advanced-accessibility"].nav-tab-active,
.anchorkit-tabs .nav-tab[href*="help"].nav-tab-active,
.anchorkit-tabs .nav-tab[href*="anchorkit-pro"].nav-tab-active {
    margin-bottom: -2px;
    padding-bottom: 14px;
    position: relative;
    z-index: 3;
    transform: translateY(-2px);
    box-shadow:
        0 -3px 4px -2px rgba(0, 0, 0, 0.1),
        -3px 0 4px -2px rgba(0, 0, 0, 0.1),
        3px 0 4px -2px rgba(0, 0, 0, 0.1);
    clip-path: inset(0px 0px -10px 0px);
}

.anchorkit-tabs .nav-tab.nav-tab-active {
    background-color: var(--anchorkit-tab-active-bg, var(--anchorkit-tab-bg, transparent));
    color: var(--anchorkit-tab-active-fg, var(--anchorkit-tab-fg, inherit));
}

/* Make icons white on hover and active states */
.anchorkit-tabs .nav-tab:hover img,
.anchorkit-tabs .nav-tab.nav-tab-active img {
    filter: brightness(0) invert(1);
    /* Make white */
    opacity: 1;
}

/* Focus states for better accessibility */
.anchorkit-tabs .nav-tab:focus {
    outline: 2px solid var(--anchorkit-tab-focus-outline, #2271b1);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--anchorkit-tab-focus-ring, rgba(34, 113, 177, 0.1));
}

/* Remove the duplicate tab-content definition and Material Design 3 state layer effect on hover */
.anchorkit-tabs .nav-tab::before {
    content: none;
    /* Remove state layer effect */
}

.anchorkit-tabs .nav-tab:hover::before {
    background-color: transparent;
}

/* Position all elements above the state layer */
.anchorkit-tabs .nav-tab>* {
    position: relative;
    z-index: 2;
}

/* Tab content transition effects - Modified for Material Design 4 elevation */
.anchorkit-tab-content {
    padding: 48px 24px;
    /* Match horizontal padding with header */
    border-radius: var(--anchorkit-tab-content-radius, 16px);
    /* MD4 uses larger border radius (overridden per-tab) */
    position: relative;
    z-index: 1;
    box-shadow:
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        0 4px 5px 0 rgba(0, 0, 0, 0.14),
        0 1px 10px 0 rgba(0, 0, 0, 0.12);
    /* MD4 elevation level 3 */
    margin-top: 0;
    /* Remove pull-up to avoid shadow cutoff */
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Ensures no shadows leak at corners */
    background-color: var(--anchorkit-tab-content-bg, transparent);
}

/* Content background colors based on active tab */
/* Tab section background colors - light shades matching each tab */
.anchorkit-admin[data-active-tab] {
    --anchorkit-tab-content-radius: 8px;
}

.anchorkit-admin[data-active-tab="quick-start"] {
    --anchorkit-tab-content-bg: #f3f5ff;
    /* Very light blue for Quick Start */
    --anchorkit-layout-shell-bg: #f3f5ff;
    /* Keep preview inside the same tab background */
}

.anchorkit-admin[data-active-tab="appearance-behavior"] {
    --anchorkit-tab-content-bg: #f4f4ff;
    /* Very light indigo for Appearance & Behavior */
    --anchorkit-layout-shell-bg: #f4f4ff;
}

.anchorkit-admin[data-active-tab="structure-seo"] {
    --anchorkit-tab-content-bg: #f8f4ff;
    /* Very light deep purple for Structure & SEO */
    --anchorkit-layout-shell-bg: #f8f4ff;
}

.anchorkit-admin[data-active-tab="advanced-accessibility"] {
    --anchorkit-tab-content-bg: #faf6ff;
    /* Very light purple for Advanced & Accessibility */
    --anchorkit-layout-shell-bg: #faf6ff;
}

.anchorkit-admin[data-active-tab="help"] {
    --anchorkit-tab-content-bg: #f6f7ff;
    /* Very light blue purple for Help */
}

.anchorkit-admin[data-active-tab="anchorkit-pro"] {
    --anchorkit-tab-content-bg: #fbf6ff;
    /* Very light violet for AnchorKit Pro */
}

/* Header Styles */
.anchorkit-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0.5rem 1.25rem;
    margin-bottom: 1.5rem;
    gap: 16px;
}

/* Animated Square Logo */
.anchorkit-animated-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anchorkit-animated-logo svg {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.anchorkit-animated-logo svg:hover {
    transform: scale(1.05);
}

/* CSS Keyframe animations for color shifting - Optimized for performance */
@keyframes colorShiftSquare1 {
    0% {
        fill: #BBD0FF;
    }

    /* Light blue */
    25% {
        fill: #E7C6FF;
    }

    /* Light purple */
    50% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    75% {
        fill: #C8B6FF;
    }

    /* Lavender */
    100% {
        fill: #BBD0FF;
    }

    /* Back to light blue */
}

@keyframes colorShiftSquare2 {
    0% {
        fill: #E7C6FF;
    }

    /* Light purple */
    25% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    50% {
        fill: #C8B6FF;
    }

    /* Lavender */
    75% {
        fill: #BBD0FF;
    }

    /* Light blue */
    100% {
        fill: #E7C6FF;
    }

    /* Back to light purple */
}

@keyframes colorShiftSquare3 {
    0% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    25% {
        fill: #C8B6FF;
    }

    /* Lavender */
    50% {
        fill: #BBD0FF;
    }

    /* Light blue */
    75% {
        fill: #E7C6FF;
    }

    /* Light purple */
    100% {
        fill: #B8C0FF;
    }

    /* Back to periwinkle */
}

@keyframes colorShiftSquare4 {
    0% {
        fill: #C8B6FF;
    }

    /* Lavender */
    25% {
        fill: #BBD0FF;
    }

    /* Light blue */
    50% {
        fill: #E7C6FF;
    }

    /* Light purple */
    75% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    100% {
        fill: #C8B6FF;
    }

    /* Back to lavender */
}

/* Apply animations to each square - Only when not in reduced motion mode */
.anchorkit-animated-logo svg #anchorkit-square-1 {
    animation: colorShiftSquare1 20s ease-in-out infinite;
    will-change: auto;
    /* Let browser optimize */
}

.anchorkit-animated-logo svg #anchorkit-square-2 {
    animation: colorShiftSquare2 20s ease-in-out infinite;
    will-change: auto;
}

.anchorkit-animated-logo svg #anchorkit-square-3 {
    animation: colorShiftSquare3 20s ease-in-out infinite;
    will-change: auto;
}

.anchorkit-animated-logo svg #anchorkit-square-4 {
    animation: colorShiftSquare4 20s ease-in-out infinite;
    will-change: auto;
}

/* Pause animation on hover for better UX */
.anchorkit-animated-logo:hover svg path {
    animation-play-state: paused;
}

/* Disable animations completely for users who prefer reduced motion */
/* Disable animations on low-end devices or when battery is low */
@media (prefers-reduced-motion: reduce),
(update: slow) {
    .anchorkit-animated-logo svg path {
        animation: none !important;
    }
}

/* Readsy Text Logo */
.anchorkit-text-logo {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2952;
    margin: 0 !important;
    /* Override the .anchorkit-admin h1 margin */
    line-height: 1;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    user-select: none;
}

/* Load Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Responsive adjustments for mobile */
@media screen and (max-width: 480px) {
    .anchorkit-header {
        gap: 12px;
    }

    .anchorkit-animated-logo svg {
        width: 36px;
        height: 36px;
    }

    .anchorkit-text-logo {
        font-size: 2rem;
    }
}

.anchorkit-admin h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 24px;
    padding: 0;
    line-height: 1.2;
}

/* Card styling */
.anchorkit-card {
    background: #fff;
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    padding: 24px;
    position: relative;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: auto;
    /* Let browser optimize */
    overflow: visible;
    /* Allow tooltips to extend beyond card */
}

.anchorkit-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.06);
}

/* Disable card hover animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .anchorkit-card {
        transition: none;
    }

    .anchorkit-card:hover {
        transform: none;
    }
}

/* Remove the recommended text from button dimensions */
.anchorkit-card h2[data-recommended] {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.25rem 0;
    padding: 0;
    color: #1d2327;
}

.anchorkit-card h2[data-recommended]::after {
    content: none;
}

/* ============================================
   VISUAL HIERARCHY IMPROVEMENTS
   ============================================ */

/* Card Title (h2) - Primary Level */
.anchorkit-card h2 {
    font-size: 1.375rem;
    /* 22px - larger, more prominent */
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    /* Increased bottom margin */
    padding: 0;
    color: #1d2327;
    letter-spacing: -0.01em;
}

/* Card Description - Distinct from titles */
.anchorkit-card .anchorkit-card-description {
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.5;
    color: #646970;
    /* Lighter gray for better contrast with titles */
    margin: 0 0 2rem 0;
    /* More space before settings */
    padding: 0;
}

.is-centered-text {
    text-align: center;
}

/* Section Headers (h3) - Secondary Level within Cards */
.anchorkit-card h3 {
    font-size: 1rem;
    /* 16px - smaller than h2 */
    font-weight: 600;
    line-height: 1.4;
    color: #2c3338;
    margin: 2.5rem 0 1.25rem 0;
    /* More top space, more bottom space */
    padding-top: 1.25rem;
    /* Extra padding top */
    border-top: 2px solid #e5e7eb;
    /* Thicker, more visible separator */
    letter-spacing: 0;
}

/* First section header in a card shouldn't have top margin/border */
.anchorkit-card h3:first-of-type,
.anchorkit-card>h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.75rem;
    /* Slightly more space between form groups */
    position: relative;
    overflow: visible;
    /* Allow tooltips to extend beyond container */
}

/* Last form group before a section header needs more space */
.anchorkit-card h3+.form-group,
.form-group+h3 {
    margin-top: 0;
    /* Section header already has margin */
}

/* Outlined Input Field Container */
.form-group .input-container {
    position: relative;
    margin-bottom: 1rem;
}

/* Size Input Group */
.form-group .size-input-group {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.form-group .size-input-group .input-container {
    flex: 1;
    margin: 0;
    max-width: 220px;
}

.form-group .size-input-group .input-container:last-child {
    flex: 0 0 100px;
}

/* Base Input Styles */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group select {
    width: 100%;
    max-width: 400px;
    padding: 16px;
    font-size: 14px;
    /* MD3 body medium */
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.87);
    /* MD3 on-surface */
    background-color: #fff;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: none;
}

/* Specific heights */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group select {
    height: 46px;
}

/* Floating label styles */
.form-group .input-container label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
    font-size: 14px;
    /* MD3 label medium */
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    /* MD3 on-surface-variant */
    padding: 0 4px;
    background-color: #fff;
    transition: all 0.2s ease;
    pointer-events: none;
    margin: 0;
}

/* Input container focus state for better UX */
.form-group .input-container.focused input:focus,
.form-group .input-container.focused select:focus,
.form-group .input-container.focused textarea:focus {
    border-color: #a1bfff;
    box-shadow: 0 0 0 3px rgba(161, 191, 255, 0.2);
}

/* Adjust label position for textarea */
.form-group .input-container textarea~label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
}

/* Label animation for focus and filled state */
.form-group .input-container input:focus~label,
.form-group .input-container select:focus~label,
.form-group .input-container textarea:focus~label,
.form-group .input-container input:not(:placeholder-shown):not([value=""])~label,
.form-group .input-container textarea:not(:placeholder-shown):not(:empty)~label {
    top: 0;
    transform: translateY(-50%) scale(0.75);
    color: #2a4380;
    font-weight: 500;
    font-size: 14px;
    /* MD3 label medium */
}

/* Hover and focus states */
.form-group input:hover,
.form-group select:hover {
    border-color: #bbd0ff;
}

/* Focus states for form elements */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0051FF;
    box-shadow: 0 0 0 4px rgba(0, 81, 255, 0.1);
}

/* Color picker component - Standardized appearance */
.anchorkit-color-picker {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin-bottom: 16px;
}

.anchorkit-color-picker input[type="color"] {
    display: block;
    width: 100%;
    height: 56px;
    padding: 4px;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    background: #fff;
}

.anchorkit-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.anchorkit-color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.anchorkit-color-picker input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Ensure labels are properly positioned and styled */
.anchorkit-color-picker label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
    font-size: 14px;
    font-weight: 500;
    color: #2a4380;
    padding: 0 4px;
    background-color: #fff;
    transition: none;
    pointer-events: none;
    margin: 0;
    z-index: 1;
}

/* Position the color value */
.anchorkit-color-picker .color-value {
    position: absolute;
    left: 16px;
    top: 56%;
    transform: translateY(-50%);
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.87);
    background: #f2f2f2;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: auto;
    max-width: 70px;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.anchorkit-color-picker input[type="color"]:hover {
    border-color: #bbd0ff;
}

.anchorkit-color-picker input[type="color"]:focus {
    border-color: #a1bfff;
    box-shadow: 0 0 0 3px rgba(161, 191, 255, 0.2);
    outline: none;
}

/* Remove any conflicting color picker styles */
.form-group input[type="color"] {
    height: 56px;
    padding: 4px;
}

/* Ensure consistent input container styling */
.form-group .input-container.anchorkit-color-picker {
    max-width: 320px;
}

/* Override any tab-specific color picker styles */
.anchorkit-admin[data-active-tab] .input-container.anchorkit-color-picker label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
}

.anchorkit-admin[data-active-tab] .input-container.anchorkit-color-picker .color-value {
    left: 16px;
    top: 50%;
}

/* ==========================================
   COMPACT STYLING: Two-Column Layouts
   ========================================== */

/* Two-column color picker grid */
.color-picker-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 1.75rem;
}

/* Make color pickers fill their grid cells */
.color-picker-row .anchorkit-color-picker {
    max-width: none;
    width: 100%;
    margin-bottom: 0;
}

/* Responsive: stack on mobile */
@media (max-width: 782px) {
    .color-picker-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Compact spacing controls - 2-3 per row */
.compact-controls-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 1.75rem;
}

.compact-controls-row .anchorkit-input-container {
    margin-bottom: 0;
}

.compact-controls-row .form-group {
    margin-bottom: 0;
}

/* Helper text below compact rows */
.compact-row-helper {
    display: block;
    font-size: 0.8125rem;
    color: #646970;
    line-height: 1.5;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Section divider for visual grouping */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0 20%, #e0e0e0 80%, transparent);
    margin: 2rem 0 2.5rem 0;
    border: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .section-divider {
        background: linear-gradient(to right, transparent, #3a3a3c 20%, #3a3a3c 80%, transparent);
    }
}

/* Tighter spacing within custom styling card */
.anchorkit-card[data-card-group="anchorkit_toc_custom_styling"] .form-group {
    margin-bottom: 1.5rem;
}

.anchorkit-card[data-card-group="anchorkit_toc_custom_styling"] h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.anchorkit-card[data-card-group="anchorkit_toc_custom_styling"] h3:first-of-type {
    margin-top: 0;
}

/* ==========================================
   LIVE PREVIEW SIDEBAR
   ========================================== */

/* Two-column layout container */
.anchorkit-layout-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 100%;
}

/* Desktop: Two-column layout with sidebar */
@media (min-width: 1200px) {
    .anchorkit-layout-shell.has-preview {
        grid-template-columns: minmax(0, 1fr) 480px;
        gap: 32px;
        padding: 48px 24px;
        background-color: var(--anchorkit-layout-shell-bg, #f4f4ff);
        /* Fallback; overridden per-tab above */
        border-radius: 16px;
        /* Match tab content rounding */
        box-shadow:
            0 2px 4px -1px rgba(0, 0, 0, 0.2),
            0 4px 5px 0 rgba(0, 0, 0, 0.14),
            0 1px 10px 0 rgba(0, 0, 0, 0.12);
        box-sizing: border-box;
        position: relative;
        overflow: visible;
        /* Allow sticky preview and card shadows to show */
    }

    .anchorkit-layout-shell.has-preview .anchorkit-tab-content {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        overflow: visible;
    }

    .anchorkit-layout-shell.has-preview .anchorkit-preview-sidebar {
        /* Offset by heading height + its margin so the preview lines up with the first settings card */
        margin-top: calc(2rem + 1.5rem);
    }
}

/* Settings content wrapper */
.anchorkit-layout-container {
    max-width: 100%;
}

/* Settings content area */
.anchorkit-tab-content {
    min-width: 0;
    /* Prevent grid blowout */
}

/* Preview Sidebar */
.anchorkit-preview-sidebar {
    display: none;
    /* Hidden on mobile by default */
    margin-top: 2rem;
    background: #ffffff;
    border-radius: 12px;
    border-top-right-radius: 12px;
    /* Ensure top-right corner is rounded */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: visible;
    /* Allow TOC to expand when View More is clicked */
    position: sticky;
    top: 40px;
    max-height: none;
    /* Remove height restriction to allow full TOC expansion */
    align-self: start;
    /* Stick to top of grid cell */
}

/* Show sidebar on desktop */
@media (min-width: 1200px) {
    .anchorkit-preview-sidebar {
        display: block;
    }
}

/* Inner container - allow expansion */
.anchorkit-preview-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: auto;
    /* Allow natural height */
    min-height: 0;
    overflow: visible;
    /* Allow content to expand naturally */
}

/* Responsive fixes to prevent preview cutoff and ensure wrapper scales */
@media (min-width: 1200px) {
    .anchorkit-preview-sidebar {
        width: 100%;
        max-width: 100%;
        /* Use dynamic viewport height but allow expansion when needed */
        max-height: none;
        /* Remove height restriction to allow TOC expansion */
        overflow: visible;
        /* Ensure content can expand beyond viewport */
    }

    .anchorkit-preview-sidebar-inner {
        height: auto;
        /* Let inner container size naturally */
        max-height: none;
        /* Remove height limit to allow expansion */
        min-height: 0;
        /* Enable flex children to shrink */
        overflow: visible;
        /* Allow content to expand beyond container */
    }

    .anchorkit-preview-content {
        min-height: 0;
        /* Allow vertical scrolling within content */
        overflow: visible;
        /* Allow TOC to expand fully */
        max-height: none;
        /* Remove max-height restriction */
    }

    /* Make sure the TOC preview wrapper cannot overflow horizontally */
    #anchorkit-sidebar-toc-preview,
    #anchorkit-sidebar-toc-preview .anchorkit-toc-container {
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Preview header */
.anchorkit-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    flex-shrink: 0;
    border-top-left-radius: 12px;
    /* Round top corners to match sidebar */
    border-top-right-radius: 12px;
    /* Round top corners to match sidebar */
}

.anchorkit-preview-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.anchorkit-preview-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.anchorkit-preview-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preview mode indicator */
.anchorkit-preview-mode-indicator {
    font-size: 0.75rem;
    color: #0073aa;
    font-weight: 500;
    padding: 2px 8px;
    background: #e8f4f8;
    border-radius: 4px;
    display: inline-block;
}

/* Preview toggle (collapse) button */
.anchorkit-preview-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #646970;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.anchorkit-preview-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d2327;
}

.anchorkit-preview-toggle svg {
    transition: transform 0.3s ease;
    width: 18px;
    height: 18px;
}

.anchorkit-preview-toggle[aria-expanded="false"] svg {
    transform: rotate(180deg);
}

/* Theme test toggle (only visible when theme is System Default) */
.anchorkit-theme-test-toggle {
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #646970;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anchorkit-theme-test-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0a0a0a;
}

.anchorkit-theme-test-toggle .theme-icon {
    display: block;
}

/* Mode indicator styling */
.anchorkit-preview-mode-indicator {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(26, 115, 232, 0.1);
    color: #1a73e8;
    font-weight: 500;
    display: inline-block;
    /* Fit background to text width */
    width: fit-content;
    /* Ensure background fits word width */
}

/* ===============================================
   DARK MODE TEST SIMULATION (System Theme Only)
   When theme is "System Default", user can test dark mode in preview
   This simulates prefers-color-scheme: dark
   =============================================== */

/* Note: Using #anchorkit-preview-sidebar as parent for all selectors to ensure proper specificity
   and prevent frontend CSS from overriding these styles */

/* Minimal preset - dark mode test */
#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal.anchorkit-toc-container {
    background: #1a1a1a !important;
    border-left-color: #444 !important;
    color: #f5f5f5 !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal .anchorkit-toc-title {
    color: #f5f5f5 !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal .anchorkit-toc-link {
    color: #4a9eff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal .anchorkit-toc-link:hover {
    color: #5aadff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top {
    border-top-color: rgba(74, 158, 255, 0.3) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a {
    color: #4a9eff !important;
}

/* Classic preset - dark mode test */
#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic.anchorkit-toc-container {
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #f5f5f5 !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic .anchorkit-toc-title {
    color: #f5f5f5 !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic .anchorkit-toc-link {
    color: #4a9eff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic .anchorkit-toc-link:hover {
    color: #5aadff !important;
    background: rgba(126, 196, 238, 0.1) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top {
    border-top-color: rgba(74, 158, 255, 0.3) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a {
    color: #4a9eff !important;
}

/* Modern preset - dark mode test (mirrors @media prefers-color-scheme: dark) */
#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) {
    background: transparent !important;
    position: relative;
    z-index: 1;
    /* Safari rendering optimization */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    border: 1px solid rgba(88, 166, 255, 0.2) !important;
    color: #f0f6fc !important;
    --anchorkit-toc-link-color: #58a6ff !important;
    --anchorkit-toc-link-hover-color: #79c0ff !important;
    --anchorkit-toc-hover-bg: rgba(88, 166, 255, 0.15) !important;
    --anchorkit-toc-text-color: #f0f6fc !important;
    --anchorkit-toc-bullet-color: #58a6ff !important;
    --anchorkit-toc-border-color: rgba(88, 166, 255, 0.2) !important;
    --anchorkit-toc-focus-bg: rgba(88, 166, 255, 0.2) !important;
    --anchorkit-toc-active-link-color: #79c0ff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: inherit;
    background: -webkit-linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2128 100%) !important;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2128 100%) !important;
    /* Safari rendering optimization */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-title {
    color: #f0f6fc !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-link {
    color: #58a6ff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-link:hover {
    color: #79c0ff !important;
    background: rgba(88, 166, 255, 0.15) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-link.active,
#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-link.anchorkit-toc-active {
    color: #79c0ff !important;
    background: rgba(88, 166, 255, 0.18) !important;
    border-left-color: #58a6ff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-view-more-btn {
    border-color: rgba(88, 166, 255, 0.4) !important;
    color: #58a6ff !important;
    background: rgba(88, 166, 255, 0.08) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-view-more-btn:hover {
    background-color: rgba(88, 166, 255, 0.15) !important;
    border-color: #79c0ff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top {
    border-top-color: rgba(88, 166, 255, 0.2) !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top a {
    color: #58a6ff !important;
}

#anchorkit-preview-sidebar.anchorkit-test-dark-mode .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-light):not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top a:hover {
    color: #79c0ff !important;
}

/* ===============================================
   LIGHT MODE TEST (force light when OS is dark)
   When theme is "System Default" and the user selects Light in the toggle,
   we must override OS-level prefers-color-scheme: dark rules.
   =============================================== */

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) {
    background: transparent !important;
    position: relative;
    z-index: 1;
    /* Safari rendering optimization */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1f1f1f !important;
    --anchorkit-toc-text-color: #1f1f1f !important;
    --anchorkit-toc-link-color: #1a73e8 !important;
    --anchorkit-toc-link-hover-color: #1557b0 !important;
    --anchorkit-toc-bullet-color: #1a73e8 !important;
    --anchorkit-toc-hover-bg: rgba(26, 115, 232, 0.08) !important;
    --anchorkit-toc-focus-bg: rgba(26, 115, 232, 0.12) !important;
    --anchorkit-toc-border-color: rgba(0, 0, 0, 0.1) !important;
    --anchorkit-toc-active-link-color: #1557b0 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: inherit;
    background: -webkit-linear-gradient(135deg, #ffffff 0%, #f8f9fc 50%, #f0f4ff 100%) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 50%, #f0f4ff 100%) !important;
    /* Safari rendering optimization */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-title {
    color: #1f1f1f !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-link {
    color: #1a73e8 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-link:hover {
    color: #1557b0 !important;
    background: rgba(26, 115, 232, 0.08) !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-link.active,
#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-link.anchorkit-toc-active {
    color: #1557b0 !important;
    background: rgba(26, 115, 232, 0.12) !important;
    border-left-color: #1a73e8 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-view-more-btn {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1a73e8 !important;
    background: rgba(26, 115, 232, 0.04) !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-view-more-btn:hover {
    background-color: rgba(26, 115, 232, 0.08) !important;
    border-color: #1557b0 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top {
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top a {
    color: #1a73e8 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-modern.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) .anchorkit-toc-back-to-top a:hover {
    color: #1557b0 !important;
}

/* Minimal preset - Force light palette */
#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) {
    background: #f8f9fa !important;
    border: none !important;
    border-left: 3px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-title {
    color: #1a1a1a !important;
    opacity: 0.7 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-link {
    color: #4a4a4a !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-link:hover {
    color: #0073aa !important;
    background: transparent !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-link.active,
#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-link.anchorkit-toc-active {
    color: #0073aa !important;
    background: transparent !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top {
    border-top-color: #e0e0e0 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a {
    color: #0073aa !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a:hover {
    color: #005177 !important;
}

/* Classic preset - Force light palette */
#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic.anchorkit-toc-container:not(.anchorkit-toc-theme-dark) {
    background: #ffffff !important;
    border: 1px solid #d4d4d4 !important;
    border-top: 4px solid #0073aa !important;
    border-radius: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    padding: 20px !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-title {
    color: #1a1a1a !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-link {
    color: #2c3e50 !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-link:hover {
    color: #0073aa !important;
    background: #f8f9fa !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-link.active,
#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-link.anchorkit-toc-active {
    color: #0073aa !important;
    background: #e8f4f8 !important;
    border-left: 3px solid #0073aa !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top {
    border-top-color: #ddd !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a {
    color: #0073aa !important;
}

#anchorkit-preview-sidebar.anchorkit-force-light .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a:hover {
    color: #004a75 !important;
}

/* Preview content area */
.anchorkit-preview-content {
    flex: 0 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 0 0 12px 12px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Collapsed state */
.anchorkit-preview-sidebar.collapsed .anchorkit-preview-content {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    overflow: hidden;
}

/* Loading state */
.anchorkit-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #646970;
    font-size: 0.875rem;
    text-align: center;
}

.anchorkit-preview-loading p {
    margin: 0;
}

/* TOC Preview specific styles */
#anchorkit-sidebar-toc-preview .anchorkit-toc-container {
    margin: 0;
    max-width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Allow TOC to expand naturally when View More is clicked - no overflow scroll */
#anchorkit-sidebar-toc-preview {
    overflow: visible !important;
}

.anchorkit-preview-sidebar:not(.collapsed) .anchorkit-preview-content {
    overflow: visible !important;
    max-height: none !important;
    /* Prevent inner scrolling on some tabs */
}

/* Back to Top styles for preview - Base styles */
#anchorkit-sidebar-toc-preview .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-back-to-top {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--anchorkit-toc-link-color, #dddddd);
    display: block;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-back-to-top a {
    color: var(--anchorkit-toc-link-color, #0073aa);
    text-decoration: none;
    font-size: var(--anchorkit-toc-back-to-top-font-size, 14px);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    display: inline-block;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-back-to-top a:hover {
    opacity: 1;
    color: var(--anchorkit-toc-link-hover-color, #005177);
}

/* Preset-specific back-to-top styles for preview - Modern preset */
/* Use !important to override frontend CSS when loaded in admin */
#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top {
    border-top-color: var(--anchorkit-toc-border-color, #e0e3eb) !important;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top a {
    color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-back-to-top a:hover {
    color: var(--anchorkit-toc-link-hover-color, #1557b0) !important;
    transform: translateX(-2px) !important;
}

/* Back to Top - Frontend CSS handles this */

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top {
    border-top-color: #e0e0e0;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a {
    color: #0073aa;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-preset-minimal .anchorkit-toc-back-to-top a:hover {
    color: #005177;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top {
    border-top-color: #ddd;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a {
    color: #0073aa;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-preset-classic .anchorkit-toc-back-to-top a:hover {
    color: #004a75;
}

/* Theme-specific back-to-top styles for preview */
#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top {
    border-top-color: #dddddd;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top a {
    color: #0073aa;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-theme-light .anchorkit-toc-back-to-top a:hover {
    color: #005177;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top,
#toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top {
    border-top-color: #444;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top a,
#toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top a {
    color: #59a9ff;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top a:hover,
#toc-preview .anchorkit-toc-theme-dark .anchorkit-toc-back-to-top a:hover {
    color: #a3c8ff;
}

/* Hierarchical indentation for preview */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-1 {
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-2 {
    padding-left: 20px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-3 {
    padding-left: 40px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-4 {
    padding-left: 60px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-5 {
    padding-left: 80px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-hierarchical .anchorkit-toc-level-6 {
    padding-left: 100px;
}

/* Bullet styles for preview */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-item {
    margin: 0;
    padding-left: 0;
}

/* Disc bullets - use ::before pseudo-elements like frontend */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-disc .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

/* Flexbox layout for items with bullets to prevent bullets from wrapping to separate line */
/* CRITICAL: Exclude hidden items so View More functionality works correctly */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) [class*="anchorkit-toc-bullet-"]:not(.anchorkit-toc-bullet-none):not(.anchorkit-toc-bullet-decimal) .anchorkit-toc-item:not(.anchorkit-toc-hidden-item) {
    display: flex !important;
    align-items: center !important;
    list-style: none;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) [class*="anchorkit-toc-bullet-"]:not(.anchorkit-toc-bullet-none):not(.anchorkit-toc-bullet-decimal) .anchorkit-toc-item:not(.anchorkit-toc-hidden-item) .anchorkit-toc-link {
    flex: 1 !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-disc .anchorkit-toc-item::before {
    content: "•" !important;
    display: inline-block !important;
    color: var(--anchorkit-toc-bullet-color, var(--anchorkit-toc-link-color, #0073aa));
    margin-right: var(--anchorkit-toc-bullet-gap, 12px);
    flex-shrink: 0 !important;
    vertical-align: middle;
    line-height: 1;
}

/* Circle bullets - use ::before pseudo-elements like frontend */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-circle .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-circle .anchorkit-toc-item::before {
    content: "○" !important;
    display: inline-block !important;
    color: var(--anchorkit-toc-bullet-color, var(--anchorkit-toc-link-color, #0073aa));
    margin-right: 10px;
    flex-shrink: 0 !important;
    vertical-align: middle;
    line-height: 1;
}

/* Square bullets - use ::before pseudo-elements like frontend */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-square .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-square .anchorkit-toc-item::before {
    content: "▪" !important;
    display: inline-block !important;
    color: var(--anchorkit-toc-bullet-color, var(--anchorkit-toc-link-color, #0073aa));
    margin-right: 10px;
    flex-shrink: 0 !important;
    vertical-align: middle;
    line-height: 1;
}

/* None bullets - no markers */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-none .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-none .anchorkit-toc-item {
    display: list-item;
    list-style: none;
}

/* Decimal bullets (numbers) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal .anchorkit-toc-list {
    list-style-type: decimal !important;
    list-style-position: outside !important;
    padding-left: 30px !important;
    margin-left: 0 !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal .anchorkit-toc-item {
    display: list-item !important;
    list-style-type: decimal !important;
    margin-left: 0 !important;
}

/* Override hierarchical padding for decimal bullets - use margin instead */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-1 {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-2 {
    padding-left: 0 !important;
    margin-left: 20px !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-3 {
    padding-left: 0 !important;
    margin-left: 40px !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-4 {
    padding-left: 0 !important;
    margin-left: 60px !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-5 {
    padding-left: 0 !important;
    margin-left: 80px !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-decimal.anchorkit-toc-hierarchical .anchorkit-toc-level-6 {
    padding-left: 0 !important;
    margin-left: 100px !important;
}

/* Custom character bullets */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-custom_character .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-custom_character .anchorkit-toc-item {
    list-style: none;
    display: block;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-custom_character .anchorkit-toc-link {
    display: inline;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-custom_character .anchorkit-toc-link::before {
    content: var(--anchorkit-toc-custom-bullet, '•');
    display: inline;
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    margin-right: 6px;
    font-weight: bold;
}

/* Check bullet (✓) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-check .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-check .anchorkit-toc-item {
    list-style: none;
    display: block;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-check .anchorkit-toc-link {
    display: inline;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-check .anchorkit-toc-link::before {
    content: "✓ ";
    display: inline;
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    margin-right: 4px;
    font-weight: bold;
}

/* Star bullet (★) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-star .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-star .anchorkit-toc-item {
    list-style: none;
    display: block;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-star .anchorkit-toc-link {
    display: inline;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-star .anchorkit-toc-link::before {
    content: "★ ";
    display: inline;
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    margin-right: 4px;
    font-weight: bold;
}

/* Arrow bullet (→) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-arrow .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-arrow .anchorkit-toc-item {
    list-style: none;
    display: block;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-arrow .anchorkit-toc-link {
    display: inline;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-arrow .anchorkit-toc-link::before {
    content: "→ ";
    display: inline;
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    margin-right: 4px;
    font-weight: bold;
}

/* Chevron bullet (›) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-chevron .anchorkit-toc-list {
    list-style: none;
    padding-left: 0;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-chevron .anchorkit-toc-item {
    list-style: none;
    display: block;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-chevron .anchorkit-toc-link {
    display: inline;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-bullet-chevron .anchorkit-toc-link::before {
    content: "› ";
    display: inline;
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    margin-right: 4px;
    font-size: 1.2em;
    font-weight: bold;
}

/* Numbering styles - higher specificity to override bullets */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-numerals .anchorkit-toc-list {
    counter-reset: toc-counter;
    list-style: none !important;
    padding-left: 0 !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-numerals .anchorkit-toc-item {
    counter-increment: toc-counter;
    list-style: none !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-numerals .anchorkit-toc-link::before {
    content: counter(toc-counter) ". ";
    color: var(--anchorkit-toc-bullet-color, #0073AA);
    font-weight: 600;
    margin-right: 6px;
}

/* View More item styling */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-item {
    margin-top: 12px !important;
    padding: 8px;
    border-top: 1px solid var(--anchorkit-toc-link-color, #dddddd);
    list-style: none !important;
}

/* Toggle icon for collapsible TOC - Match frontend exactly */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-toggle-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-collapsed .anchorkit-toc-toggle-icon {
    transform: rotate(-45deg);
}

/* Toggle button styling - Match frontend exactly */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-toggle-button {
    background: none;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    color: var(--anchorkit-toc-link-color, #0073aa);
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-toggle-button:hover {
    color: var(--anchorkit-toc-link-hover-color, #005177);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-toggle-button:focus {
    outline: 2px solid var(--anchorkit-toc-link-color, #0073aa);
    outline-offset: 2px;
}

/* Collapsible animation */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-collapsible .anchorkit-toc-list {
    transition: height 0.3s ease, opacity 0.3s ease;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-collapsed .anchorkit-toc-list {
    height: 0 !important;
    overflow: hidden;
    opacity: 0;
}

/* Make collapsed TOC more compact in preview - match frontend spacing */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-collapsed {
    padding-bottom: var(--anchorkit-toc-padding, 15px) !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-collapsed .anchorkit-toc-title {
    margin-bottom: 12px !important;
}

/* View More button styling */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--anchorkit-toc-link-color, #0073aa);
    border-radius: 4px;
    color: var(--anchorkit-toc-link-color, #0073aa);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-btn:hover {
    background-color: var(--anchorkit-toc-link-color, #0073aa);
    color: var(--anchorkit-toc-bg, #ffffff);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-btn:focus {
    outline: 2px solid var(--anchorkit-toc-link-color, #0073aa);
    outline-offset: 2px;
}

/* View More icon - matches frontend exactly */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-icon {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-style: solid;
    border-width: 0 2px 2px 0;
    border-color: currentColor;
    transform: rotate(45deg);
    margin-right: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon rotation - expanded state (matches frontend logic) */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-view-more-btn[aria-expanded="true"] .anchorkit-toc-view-more-icon {
    transform: rotate(-135deg);
}

/* Hidden items - completely remove from layout (matches frontend) */
/* High specificity to override all bullet style rules */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-item.anchorkit-toc-hidden-item {
    display: none !important;
}

/* Theme-specific View More button styles */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-theme-light .anchorkit-toc-view-more-btn {
    border-color: #0073aa;
    color: #0073aa;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-theme-light .anchorkit-toc-view-more-btn:hover {
    background-color: #0073aa;
    color: var(--anchorkit-toc-bg, #ffffff);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-theme-dark .anchorkit-toc-view-more-btn {
    border-color: #59a9ff;
    color: #59a9ff;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-theme-dark .anchorkit-toc-view-more-btn:hover {
    background-color: #59a9ff;
    color: var(--anchorkit-toc-bg, #1e1e1e);
}

/* Preset-specific View More button styles - Modern preset (matches frontend) */
/* Use !important to override frontend CSS when loaded in admin */
#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn {
    border-color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    background: rgba(26, 115, 232, 0.04) !important;
    font-weight: 500 !important;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn:hover,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn:hover {
    background-color: var(--anchorkit-toc-hover-bg, rgba(26, 115, 232, 0.08)) !important;
    border-color: var(--anchorkit-toc-link-hover-color, #1557b0) !important;
    color: var(--anchorkit-toc-link-hover-color, #1557b0) !important;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn:focus,
#toc-preview .anchorkit-toc-preset-modern .anchorkit-toc-view-more-btn:focus {
    outline-color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    background-color: var(--anchorkit-toc-hover-bg, rgba(26, 115, 232, 0.08)) !important;
}

/* View More button - Frontend CSS handles this */

/* ================================================
   TOC PREVIEW - NO CUSTOM STYLES
   Preview uses 100% frontend CSS from anchorkit-frontend.css
   This ensures perfect parity between preview and live site
   ================================================ */

/* Only structural/layout overrides for preview container */
#anchorkit-sidebar-toc-preview .anchorkit-toc-container {
    margin: 0;
    max-width: 100%;
    width: 100% !important;
    /* Override any inline width for preview */
}

/* Title styling for preview - matches frontend spacing */
#anchorkit-sidebar-toc-preview .anchorkit-toc-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px 0;
    /* Match frontend: top, right, bottom (12px), left */
    padding: 0;
    font-weight: 600;
    color: var(--anchorkit-toc-text-color, #333333);
    font-size: var(--anchorkit-toc-title-font-size, inherit);
}

/* Make title clearly interactive when collapsible is enabled */
#anchorkit-sidebar-toc-preview .anchorkit-toc-collapsible .anchorkit-toc-title {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    padding: 8px;
    margin: -8px -8px 12px -8px;
    /* Negative margin for sides/top, preserve 12px bottom margin to match frontend */
    border-radius: 4px;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-collapsible .anchorkit-toc-title:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern .anchorkit-toc-link {
    display: block;
    color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: var(--anchorkit-toc-link-decoration, none);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern .anchorkit-toc-link:hover {
    color: var(--anchorkit-toc-link-hover-color, #1557b0) !important;
    background: var(--anchorkit-toc-hover-bg, rgba(26, 115, 232, 0.08));
    transform: translateX(2px);
    text-decoration: var(--anchorkit-toc-link-decoration-hover, none);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern .anchorkit-toc-link:visited {
    color: var(--anchorkit-toc-link-color, #1a73e8) !important;
    text-decoration: var(--anchorkit-toc-link-decoration, none);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern .anchorkit-toc-link.active,
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern .anchorkit-toc-link.anchorkit-toc-active {
    color: var(--anchorkit-toc-link-hover-color, #1557b0) !important;
    font-weight: 600;
    background: rgba(26, 115, 232, 0.12);
    border-left: 3px solid var(--anchorkit-toc-link-color, #1a73e8);
    padding-left: 9px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern.anchorkit-toc-hierarchical .anchorkit-toc-level-2 {
    padding-left: 24px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern.anchorkit-toc-hierarchical .anchorkit-toc-level-3 {
    padding-left: 48px;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-preset-modern.anchorkit-toc-hierarchical .anchorkit-toc-level-4 {
    padding-left: 72px;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-link {
    display: inline-block;
    padding: 6px 0;
    text-decoration: var(--anchorkit-toc-link-decoration, none);
    color: var(--anchorkit-toc-link-color, #0073AA);
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

#anchorkit-sidebar-toc-preview .anchorkit-toc-link:hover {
    color: var(--anchorkit-toc-link-hover-color, #005177);
    text-decoration: var(--anchorkit-toc-link-decoration-hover, none);
}


/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .anchorkit-preview-sidebar {
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border-color: #e5e7eb;
    }

    .anchorkit-preview-header {
        background: linear-gradient(to bottom, #ffffff, #f9fafb);
        border-bottom-color: #e5e7eb;
    }

    .anchorkit-preview-header h3 {
        color: #646970;
    }

    .anchorkit-preview-toggle {
        color: #646970;
    }

    .anchorkit-preview-loading {
        color: #646970;
    }
}

/* M3 Checkbox Styles */
.anchorkit-card input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #79747e;
    /* MD3 outline color */
    border-radius: 2px;
    margin-right: 0;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
    background-color: #fff;
    opacity: 0.88;
    /* Match M3 opacity for inactive state */
}

.anchorkit-card input[type="checkbox"]:hover {
    border-color: #6750a4;
    /* Primary color on hover */
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(103, 80, 164, 0.08);
    /* Match toggle hover effect */
}

.anchorkit-card input[type="checkbox"]:checked {
    background-color: #6750a4;
    /* Use same purple as toggle */
    border-color: #6750a4;
    opacity: 1;
}

.anchorkit-card input[type="checkbox"]:checked::before {
    content: none;
}

.anchorkit-card input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.anchorkit-card input[type="checkbox"]:focus {
    outline: none;
    border-color: #6750a4;
    box-shadow: 0 0 0 4px rgba(103, 80, 164, 0.1);
    /* Match toggle focus effect */
}

/* Disabled state */
.anchorkit-card input[type="checkbox"]:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    border-color: rgba(0, 0, 0, 0.38);
    background-color: transparent;
}

.anchorkit-card input[type="checkbox"]:disabled:checked {
    background-color: rgba(0, 0, 0, 0.38);
}

.anchorkit-card .setting-wrapper {
    margin-bottom: 1.75rem;
    /* Match form-group spacing */
}

/* Setting wrapper label text */
.anchorkit-card .setting-wrapper label {
    font-size: 0.9375rem;
    /* 15px - slightly larger for better hierarchy */
    font-weight: 500;
    color: #1d2327;
    line-height: 1.5;
}

/* Preview card specific styles */
.anchorkit-card .preview-content {
    padding: 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #50575e;
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Remove the now-unused anchorkit-preview styles */
.anchorkit-preview {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-top: 24px;
    padding: 1.5rem;
}

.anchorkit-preview h2 {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    padding: 0;
    color: #1d2327;
}

.anchorkit-preview p {
    font-size: 14px;
    line-height: 1.4;
    color: #50575e;
    margin: 0 0 1rem 0;
}

.anchorkit-preview .preview-content {
    padding: 1rem;
    background: #f6f7f7;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #50575e;
    margin-top: 1rem;
}

#font-size-warning {
    margin-top: 8px;
    padding: 8px;
    background-color: #fee;
    border-left: 4px solid #d63638;
}

.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 1rem;
    margin-bottom: 24px;
}

/* Specifically target color inputs in settings rows */
.settings-row .form-group .input-container input[type="color"] {
    width: 100%;
    max-width: 320px;
}

.post-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 1rem;
    margin-bottom: 24px;
}

.post-types-grid label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-types-grid .anchorkit-option-label {
    display: inline-block;
    padding-top: 1px;
}

.post-types-grid input[type="checkbox"] {
    margin: 0;
}

/* Add spacing between sections */
.anchorkit-card section+section {
    margin-top: 2rem;
}

/* Both grid layout styles are defined earlier in the file */

/* WordPress Admin Button Styles */
.wp-core-ui .button.button-primary,
.wp-core-ui .button-primary {
    /* Base styles */
    background-color: var(--md-sys-color-primary, #1d2327);
    color: var(--md-sys-color-on-primary, #FFFFFF);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    height: 40px;
    min-width: 120px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.1px;
    text-transform: capitalize;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15),
        0 1px 2px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin-top: 24px;
}

/* Hover state */
.wp-core-ui .button.button-primary:hover,
.wp-core-ui .button-primary:hover {
    background-color: var(--md-sys-color-primary-hover, #3e3e3e);
    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15),
        0 1px 2px 0 rgba(0, 0, 0, 0.3);
    border: none;
    color: var(--md-sys-color-on-primary, #FFFFFF);
}

/* Focus state */
.wp-core-ui .button.button-primary:focus,
.wp-core-ui .button-primary:focus {
    background-color: var(--md-sys-color-primary-focus, #8C7FB8);
    outline: none;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15),
        0 1px 2px 0 rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(103, 80, 164, 0.1);
    border: none;
    color: var(--md-sys-color-on-primary, #FFFFFF);
}

/* Active/Pressed state */
.wp-core-ui .button.button-primary:active,
.wp-core-ui .button-primary:active {
    background-color: var(--md-sys-color-primary-pressed, #5E4A94);
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    transform: scale(0.98);
    border: none;
    color: var(--md-sys-color-on-primary, #FFFFFF);
}

/* Disabled state */
.wp-core-ui .button.button-primary:disabled,
.wp-core-ui .button-primary:disabled {
    background-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.38);
    box-shadow: none;
    cursor: not-allowed;
    border: none;
}

/* M3 Switch Styles */
.m3-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    user-select: none;
    padding: 8px 0;
    /* Remove cursor pointer from entire label - only track should be clickable */
    cursor: default;
}

/* Hide the checkbox completely but keep it functional */
.m3-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    pointer-events: none;
    left: -9999px;
}

/* Ensure the first card is never disabled */
.anchorkit-card:first-of-type {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.anchorkit-card:first-of-type .m3-switch,
.anchorkit-card:first-of-type .m3-track,
.anchorkit-card:first-of-type .m3-thumb,
.anchorkit-card:first-of-type label,
.anchorkit-card:first-of-type .setting-wrapper {
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Reset any disabled styles that might be inherited */
.anchorkit-card:first-of-type.disabled-card,
.anchorkit-card:first-of-type .disabled-field {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: auto !important;
}

/* Ensure the track and thumb are properly positioned */
.m3-track {
    width: 52px;
    height: 32px;
    display: inline-block;
    border-radius: 16px;
    background-color: #e0e0e0;
    position: relative;
    transition: background-color 0.2s;
    box-sizing: border-box;
    border: 2px solid #79747e;
    opacity: 0.38;
    /* Only the track should be clickable */
    cursor: pointer;
}

.m3-thumb {
    position: absolute;
    height: 24px;
    width: 24px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background-color 0.2s;
}

/* Unchecked State */
.m3-switch input:not(:checked)+.m3-track {
    background-color: #e0e0e0;
    border: 2px solid #79747e;
    opacity: 0.38;
}

.m3-switch input:not(:checked)+.m3-track .m3-thumb {
    background-color: #f2f2f2;
}

/* Checked State */
.m3-switch input:checked+.m3-track {
    background-color: #6750a4;
    border-color: #6750a4;
    opacity: 1;
}

.m3-switch input:checked+.m3-track .m3-thumb {
    transform: translateX(20px);
    background-color: #ffffff;
}

/* Focus State */
.m3-switch input:focus+.m3-track {
    box-shadow: 0 0 0 4px rgba(103, 80, 164, 0.1);
}

/* Hover State */
.m3-switch:hover input+.m3-track {
    box-shadow: 0 0 0 8px rgba(103, 80, 164, 0.08);
}

/* Disabled State */
.m3-switch input:disabled+.m3-track {
    opacity: 0.12;
    cursor: not-allowed;
}

.m3-switch input:disabled+.m3-track .m3-thumb {
    background-color: #e0e0e0;
}

.m3-switch-label {
    margin-left: 12px;
    font-size: 16px;
    font-weight: 500;
    /* Prevent label text from being clickable */
    cursor: default;
    pointer-events: none;
}

.status-text {
    transition: all 0.2s;
}

/* Status text colors */
.m3-switch input:checked~.m3-switch-label .status-text {
    color: #6750a4;
    /* Material Design purple for enabled state */
}

.m3-switch input:not(:checked)~.m3-switch-label .status-text {
    color: #d32f2f;
    /* Material Design red for disabled state */
}

/* Disabled setting styles - completely revised */
.disabled-card {
    opacity: 0.62;
    pointer-events: none;
    position: relative;
}

.disabled-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(250, 250, 250, 0.08);
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

/* Target every element within a disabled card to ensure consistent styling */
.disabled-card *:not(.m3-switch *) {
    opacity: 0.38;
    cursor: not-allowed !important;
}

/* Specific styling for preview elements */
.disabled-card .preview-content {
    opacity: 0.38 !important;
    filter: grayscale(30%);
    background-color: #f6f7f7 !important;
    position: relative;
}

.disabled-card #preview-prefix,
.disabled-card #preview-time {
    opacity: 0.38 !important;
}

/* Add overlay to preview content when disabled */
.disabled-card .preview-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    border-radius: inherit;
}

/* Hide font-size warning in disabled state */
.disabled-card #font-size-warning {
    display: none !important;
}

/* Lock overlay for cards controlled by Custom Styling */
.anchorkit-lockable-card {
    position: relative;
}

.anchorkit-lockable-card.is-locked .anchorkit-lock-overlay {
    display: flex;
}

.anchorkit-lock-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: inherit;
    padding: 36px 32px;
    z-index: 20;
    pointer-events: auto;
}

.anchorkit-lock-overlay__content {
    max-width: 520px;
    width: 100%;
}

.anchorkit-lock-overlay__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.anchorkit-lock-overlay__title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #1f2933;
}

.anchorkit-lock-overlay__message {
    margin: 0 0 14px 0;
    color: #4b5563;
    line-height: 1.6;
}

.anchorkit-lock-overlay__subtitle {
    margin: 0;
    font-size: 14px;
    color: #7b8794;
}

.input-container option {
    color: #1d2327;
    background-color: red !important;
}

body.settings_page_anchorkit-settings select::-ms-expand {
    display: none !important;
}

/* Shortcode Documentation Styles */
.shortcode-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.shortcode-example {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 16px;
}

.shortcode-example h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1d2327;
}

.shortcode-example code {
    display: block;
    background-color: #f0f0f1;
    padding: 10px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: #1d2327;
    margin: 8px 0;
    white-space: nowrap;
    overflow: auto;
}

/* Option label styling */
.anchorkit-option-label {
    font-size: 1.125rem;
    font-weight: normal;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 6px;
}

/* Setting wrapper refinements for checkboxes with labels */
.setting-wrapper label {
    display: flex;
    align-items: center;
    margin: 0;
}

.setting-wrapper .helper-text {
    margin-top: 8px;
    margin-left: 0;
    /* Remove indent - align with toggle */
    display: block;
    max-width: 600px;
    /* Prevent overly long lines */
}

/* Material Design 3 Notification */
.anchorkit-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    min-width: 320px;
    max-width: 420px;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.anchorkit-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.anchorkit-notification-content {
    background-color: #333333;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    max-width: 100%;
}

.anchorkit-notification-icon {
    display: none;
    margin-right: 12px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.anchorkit-notification-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.anchorkit-notification.success .success-icon,
.anchorkit-notification.error .error-icon,
.anchorkit-notification.info .info-icon {
    display: flex;
}

.anchorkit-notification.success .anchorkit-notification-icon svg {
    fill: #81c995;
}

.anchorkit-notification.error .anchorkit-notification-icon svg {
    fill: #f9dedc;
}

.anchorkit-notification.info .anchorkit-notification-icon svg {
    fill: #b9deff;
}

.anchorkit-notification-message {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.1px;
    flex-grow: 1;
    margin-right: 8px;
}

.anchorkit-notification-close {
    background: none;
    border: none;
    padding: 4px;
    margin: -4px;
    color: rgba(255, 255, 255, 0.7);
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.anchorkit-notification-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.anchorkit-notification-close:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Success notification */
.anchorkit-notification.success .anchorkit-notification-content {
    background-color: #0b6e31;
    color: #e6f4ea;
}

/* Error notification */
.anchorkit-notification.error .anchorkit-notification-content {
    background-color: #b3261e;
    color: #f9dedc;
}

/* Info notification */
.anchorkit-notification.info .anchorkit-notification-content {
    background-color: #0a5da8;
    color: #e0f1ff;
}

/* Reset to Default button */
.anchorkit-reset-button {
    position: static;
    margin-left: auto;
    margin-top: 3rem;
    background-color: transparent;
    border: none;
    color: var(--md-sys-color-primary, #2271b1);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s, color 0.2s;
}

.anchorkit-reset-button:hover {
    background-color: rgba(34, 113, 177, 0.08);
}

/* Focus states for buttons */
.anchorkit-reset-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0051FF;
}

.anchorkit-reset-button svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: currentColor;
}

/* Reset to Default button - disabled state */
.anchorkit-reset-button.disabled,
.anchorkit-reset-button:disabled,
.anchorkit-reset-button[aria-disabled="true"] {
    opacity: 0.38;
    cursor: not-allowed !important;
    color: var(--md-sys-color-on-surface-variant, #777);
    pointer-events: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.anchorkit-reset-button.disabled:hover,
.anchorkit-reset-button:disabled:hover,
.anchorkit-reset-button[aria-disabled="true"]:hover {
    background-color: transparent !important;
    color: var(--md-sys-color-on-surface-variant, #777) !important;
    box-shadow: none !important;
}

.anchorkit-reset-button.disabled svg,
.anchorkit-reset-button:disabled svg,
.anchorkit-reset-button[aria-disabled="true"] svg {
    fill: var(--md-sys-color-on-surface-variant, #777);
}

/* Material Design 3 Modal Dialog */
.anchorkit-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.32);
    /* MD3 scrim opacity */
    backdrop-filter: blur(1px);
}

.anchorkit-modal-content {
    background-color: #fff;
    margin: 10% auto;
    max-width: 560px;
    border-radius: 28px;
    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15),
        0 1px 2px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modal-appear 0.25s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.anchorkit-modal-header {
    padding: 24px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.anchorkit-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    color: #1f1f1f;
    line-height: 32px;
}

.anchorkit-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #5f6368;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: -12px;
    margin-top: -12px;
    transition: background-color 0.2s;
}

.anchorkit-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.anchorkit-modal-body {
    padding: 0 24px 24px;
    color: #1f1f1f;
    font-size: 16px;
    line-height: 24px;
}

.anchorkit-modal-footer {
    padding: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.anchorkit-modal-footer button {
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    transition: all 0.2s;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anchorkit-modal-cancel {
    background-color: transparent;
    color: #0b57d0;
}

.anchorkit-modal-cancel:hover {
    background-color: rgba(11, 87, 208, 0.08);
}

.anchorkit-modal-confirm {
    background-color: #0b57d0;
    color: white;
}

.anchorkit-modal-confirm:hover {
    background-color: #0842a0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Input container label styling */
.input-container label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

/* Helper text with code tags */
.helper-text code {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    background-color: #f0f0f1;
    padding: 2px 4px;
    border-radius: 4px;
    color: #2a4380;
}

/* Style the spacing between toggle and its dependent field */
.m3-switch+.form-group {
    margin-top: 8px;
    margin-left: 24px;
}

/* Reduce spacing between related toggle items */
.form-group+.form-group .m3-switch {
    margin-top: 16px;
}

/* Ensure labels remain visible */
.form-group .input-container label {
    z-index: 2;
    background-color: #fff;
    padding: 0 4px;
}

/* Remove transition properties */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}


/* Form group heading styles */
.form-group h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #1d2327;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .anchorkit-tabs .nav-tab {
        border: 2px solid currentColor;
    }

    .anchorkit-tabs .nav-tab.nav-tab-active {
        border: 2px solid currentColor;
    }

    .anchorkit-card {
        border: 1px solid currentColor;
    }
}

/* Material Design expansion animations */
.form-group {
    will-change: height, opacity, margin-top;
    transform-origin: top;
}

/* Input Error States - Material Design 3 */
.form-group input.error,
.form-group select.error {
    border-color: #B3261E !important;
    /* MD3 Error color */
    box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1) !important;
}

/* Error Message Styling - Material Design 3 */
.field-error-message {
    display: flex;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 8px;
    color: #B3261E;
    /* MD3 Error color */
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.4px;
    padding: 0 4px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.field-error-message svg {
    flex-shrink: 0;
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.field-error-message span {
    flex-grow: 1;
}

/* Animation for error message */
.field-error-message {
    animation: errorAppear 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes errorAppear {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Readsy Unified Input Component Styles
   Applies to text, number, and select fields using the
   .anchorkit-input-container pattern introduced for 2024.06
   ===================================================== */

.anchorkit-input-container {
    position: relative;
    margin-bottom: 1rem;
}

/* Base element styles */
.anchorkit-input-container .anchorkit-input,
.anchorkit-input-container .anchorkit-select {
    width: 100%;
    max-width: 400px;
    height: 46px;
    padding: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.87);
    /* MD3 on-surface */
    background-color: #fff;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: none;
    outline: none;
}

/* Hover state */
.anchorkit-input-container .anchorkit-input:hover,
.anchorkit-input-container .anchorkit-select:hover {
    border-color: #bbd0ff;
}

/* Focus state */
.anchorkit-input-container .anchorkit-input:focus,
.anchorkit-input-container .anchorkit-select:focus {
    border-color: #0051FF;
    box-shadow: 0 0 0 4px rgba(0, 81, 255, 0.1);
}

/* Floating label */
.anchorkit-input-container label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    background: #fff;
    padding: 0 4px;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Float up on focus or when field has value */
.anchorkit-input-container .anchorkit-input:focus~label,
.anchorkit-input-container .anchorkit-select:focus~label,
.anchorkit-input-container .anchorkit-input:not(:placeholder-shown):not([value=""])~label,
.anchorkit-input-container .anchorkit-select:not([value=""])~label {
    top: 0;
    transform: translateY(-50%) scale(0.75);
    color: #2a4380;
}

/* Error state */
.anchorkit-input-container .anchorkit-input.error,
.anchorkit-input-container .anchorkit-select.error {
    border-color: #B3261E !important;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1) !important;
}

/* Helper / error text alignment when using new container */
.anchorkit-input-container+.field-error-message,
.anchorkit-input-container+.helper-text {
    margin-top: 4px;
    max-width: 400px;
}

/* ======================================
   Fix inconsistent label behavior
   Make all labels use the same floating position
   regardless of placeholder or has-placeholder class
   ====================================== */
.form-group .input-container.has-placeholder label {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-50%) scale(0.75);
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    padding: 0 4px;
    background-color: #fff;
    transition: all 0.2s ease;
    pointer-events: none;
    margin: 0;
}

/* Remove any extra top padding that shifts the input field */
.form-group .input-container.has-placeholder {
    padding-top: 0;
}

/* Make sure placeholder opacity is consistent */
.form-group .input-container.has-placeholder input::placeholder,
.form-group .input-container input::placeholder {
    opacity: 0;
}

/* Make sure label remains in the floating position when input is focused or has value */
.form-group .input-container.has-placeholder.focused label,
.form-group .input-container.focused label {
    color: var(--md-sys-color-primary, #6750a4);
}

.anchorkit-tabs-dropdown.open {
    z-index: 998;
    /* Reduced from 11000 */
}

.anchorkit-tabs-dropdown-menu {
    z-index: 999;
    /* Reduced from 12000 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.anchorkit-tabs-dropdown.open .anchorkit-tabs-dropdown-button {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ===============================================
   Style Preset Picker
   =============================================== */

.anchorkit-preset-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.anchorkit-preset-option {
    position: relative;
    cursor: pointer;
    display: block;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.anchorkit-preset-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.preset-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

.anchorkit-preset-option:hover .preset-card {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.anchorkit-preset-option.selected .preset-card {
    border-color: #0073aa;
    box-shadow: 0 2px 12px rgba(0, 115, 170, 0.2);
}

.preset-preview {
    padding: 36px 16px 16px 16px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.preview-item {
    height: 6px;
    border-radius: 3px;
    opacity: 0.7;
}

.preview-item-sub {
    margin-left: 16px;
    width: calc(100% - 16px);
}

/* Minimal Preset */
.preset-minimal {
    background: #fafafa;
}

.preset-minimal .preview-title {
    color: #333;
}

.preset-minimal .preview-item {
    background: #666;
}

/* Classic Preset */
.preset-classic {
    background: #fff;
    border: 1px solid #ddd;
}

.preset-classic .preview-title {
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.preset-classic .preview-item {
    background: #0073aa;
}

/* Modern Preset - Clean white background with gradient on items */
.preset-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 50%, #f0f4ff 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.preset-modern .preview-title {
    color: #1f1f1f;
    font-weight: 600;
}

/* Material Design 3 inspired gradient for preview items */
.preset-modern .preview-item {
    background: linear-gradient(90deg, #1a73e8 0%, #1557b0 100%);
    opacity: 1;
}

.preset-info {
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.preset-info strong {
    display: block;
    font-size: 14px;
    color: #1d2327;
    margin-bottom: 2px;
}

.preset-description {
    font-size: 12px;
    color: #646970;
}

.preset-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.anchorkit-preset-option.selected .preset-checkmark {
    display: flex;
}

.anchorkit-preset-option.pro-locked {
    cursor: not-allowed;
    pointer-events: none;
}

.anchorkit-preset-option.pro-locked .preset-card {
    opacity: 0.6;
    filter: grayscale(15%);
    position: relative;
}

.preset-lock-overlay,
.preset-lock-text {
    display: none;
}

@media (max-width: 782px) {
    .anchorkit-preset-picker {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   Pro Feature Teasers
   =============================================== */

.anchorkit-pro-feature {
    position: relative;
    background: linear-gradient(135deg, #f8f9ff 0%, #fef8ff 100%);
    border: 2px solid #e8d9f6;
}

.anchorkit-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3);
    position: absolute;
    top: 16px;
    right: 16px;
    margin-bottom: 0;
}

.pro-icon {
    font-size: 14px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.pro-feature-preview {
    position: relative;
    margin: 20px 0;
}

.pro-feature-preview.disabled {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(30%);
}

.pro-feature-preview.disabled .m3-switch {
    opacity: 0.6;
}

.pro-feature-preview.disabled input,
.pro-feature-preview.disabled select,
.pro-feature-preview.disabled textarea {
    cursor: not-allowed;
    background: #f5f5f5;
}

.pro-upgrade-prompt {
    background: linear-gradient(135deg, #f0f6ff 0%, #fef0ff 100%);
    border: 2px dashed #9f7aea;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 20px;
}

.pro-upgrade-prompt p {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.6;
}

.pro-upgrade-prompt strong {
    color: #2d3748;
}

.anchorkit-button {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.anchorkit-button-primary {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3);
}

.anchorkit-button-primary:visited {
    color: white;
}

.anchorkit-button-primary:not([disabled]):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

.anchorkit-button-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pro badge subtle animation */
.anchorkit-pro-badge {
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.preset-card .anchorkit-pro-badge {
    top: 8px;
    right: 8px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===================================================================
   Tooltip Component - Material Design 3
   =================================================================== */

.anchorkit-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.anchorkit-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--md-sys-color-surface-variant, #e7e0ec);
    color: var(--md-sys-color-on-surface-variant, #49454f);
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.anchorkit-tooltip-icon:hover,
.anchorkit-tooltip-icon:focus {
    background: var(--md-sys-color-primary, #6750a4);
    color: var(--md-sys-color-on-primary, #ffffff);
    transform: scale(1.1);
    border-color: var(--md-sys-color-primary, #6750a4);
}

.anchorkit-tooltip-icon:focus {
    outline: 2px solid var(--md-sys-color-primary, #6750a4);
    outline-offset: 2px;
}

.anchorkit-tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--md-sys-color-inverse-surface, #322f35);
    color: var(--md-sys-color-inverse-on-surface, #f5eff7);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 320px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: normal;
    word-wrap: break-word;
}

.anchorkit-tooltip-icon:hover+.anchorkit-tooltip-content,
.anchorkit-tooltip-icon:focus+.anchorkit-tooltip-content,
.anchorkit-tooltip-content:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.anchorkit-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--md-sys-color-inverse-surface, #322f35);
}

/* Tooltip content styling */
.anchorkit-tooltip-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #a8dadc;
}

.anchorkit-tooltip-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    list-style: disc;
}

.anchorkit-tooltip-content li {
    margin: 4px 0;
}

.anchorkit-tooltip-content strong {
    color: var(--md-sys-color-inverse-on-surface, #f5eff7);
    font-weight: 600;
}

/* Tooltip positioning variants */
.anchorkit-tooltip-wrapper.tooltip-right .anchorkit-tooltip-content {
    left: calc(100% + 8px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(-4px);
}

.anchorkit-tooltip-wrapper.tooltip-right .anchorkit-tooltip-icon:hover+.anchorkit-tooltip-content,
.anchorkit-tooltip-wrapper.tooltip-right .anchorkit-tooltip-icon:focus+.anchorkit-tooltip-content {
    transform: translateY(-50%) translateX(0);
}

.anchorkit-tooltip-wrapper.tooltip-right .anchorkit-tooltip-content::after {
    top: 50%;
    left: 0;
    transform: translateX(-100%) translateY(-50%);
    border-top-color: transparent;
    border-right-color: var(--md-sys-color-inverse-surface, #322f35);
}

/* Label with tooltip */
.anchorkit-label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.anchorkit-label-with-tooltip label {
    margin: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .anchorkit-tooltip-icon {
        background: #3a3541;
        color: #cac4d0;
    }

    .anchorkit-tooltip-content {
        background: #49454f;
        color: #e6e1e5;
    }

    .anchorkit-tooltip-content::after {
        border-top-color: #49454f;
    }

    .anchorkit-tooltip-wrapper.tooltip-right .anchorkit-tooltip-content::after {
        border-right-color: #49454f;
    }
}

/* ============================================
   PRO VS FREE COMPARISON TABLE
   ============================================ */

.anchorkit-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}

.anchorkit-comparison-table thead {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
}

.anchorkit-comparison-table th {
    padding: 16px;
    text-align: left;
    font-weight: 400;
    font-size: 24px;
}

.anchorkit-comparison-table th:first-child {
    border-radius: 8px 0 0 0;
    font-size: 24px;
    text-align: left;
}

.anchorkit-comparison-table th:nth-child(2),
.anchorkit-comparison-table th:nth-child(3) {
    text-align: center;
}

.anchorkit-comparison-table th:last-child {
    border-radius: 0 8px 0 0;
    text-align: center;
    font-size: 24px;
}

.anchorkit-comparison-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.anchorkit-comparison-table tbody tr:hover {
    background-color: #f9fafb;
}

.anchorkit-comparison-table tbody tr:last-child {
    border-bottom: none;
}

.anchorkit-comparison-table td {
    padding: 14px 16px;
    vertical-align: middle;
    text-align: left;
}

.anchorkit-comparison-table td:first-child {
    text-align: left;
}

.anchorkit-comparison-table td:nth-child(2),
.anchorkit-comparison-table td:nth-child(3) {
    text-align: center;
}

.anchorkit-comparison-table td:last-child {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    padding: 24px;
}

.anchorkit-comparison-table .feature-category {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
    padding: 12px 16px;
    font-size: 13px;
    text-align: left !important;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.anchorkit-comparison-table .feature-name {
    font-weight: 500;
    color: #111827;
    font-size: 16px;
}

.anchorkit-comparison-table .feature-description {
    color: #6b7280;
    margin-top: 4px;
    font-size: 16px;
}

.anchorkit-comparison-table .check-icon {
    color: #10b981;
    font-size: 20px;
}

.anchorkit-comparison-table .cross-icon {
    color: #ef4444;
    font-size: 20px;
}

.anchorkit-comparison-table .feature-label {
    font-weight: 600 !important;
    color: #111827 !important;
    margin-left: 4px;
    font-size: 13px !important;
    display: inline-block;
}

.pro-badge-inline {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* ============================================
   PRICING CARDS
   ============================================ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on small screens */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
}

.pricing-card.popular {
    border-color: #667eea;
    border-width: 3px;
    transform: scale(1.03);
}

.pricing-card.popular::before {
    content: "MOST POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pricing-tier {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.pricing-amount {
    font-size: 42px;
    font-weight: 800;
    color: #111827;
    margin: 16px 0;
}

.pricing-amount sup {
    font-size: 22px;
    font-weight: 600;
    color: #6b7280;
}

.pricing-period {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
}

.pricing-savings {
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    min-height: 20px;
}

.pricing-meta {
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    margin: 8px 0 0;
}

.pricing-meta-accent {
    font-size: 13px;
    line-height: 1.5;
    color: #111827;
    font-weight: 600;
    margin-top: 4px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    color: #4b5563;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.pricing-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: 700;
    margin-right: 12px;
    font-size: 16px;
}

.pricing-button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    text-decoration: none;
    display: block;
    text-align: center;
    box-sizing: border-box;
}

.pricing-button:hover,
.pricing-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(63, 81, 181, 0.3);
    color: white;
    text-decoration: none;
}

.pricing-button:active {
    transform: translateY(0);
}

.pricing-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.lifetime-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #f9fafb;
    user-select: none;
}

.faq-header:hover {
    background-color: #f3f4f6;
}

.faq-question-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.faq-question {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: block;
    margin: 0;
}

.faq-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 16px;
    transition: transform 0.3s ease;
    color: #667eea;
    font-size: 20px;
    flex-shrink: 0;
}

.faq-toggle.open {
    transform: rotate(90deg);
}

.faq-toggle::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
}

.faq-answer {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.faq-answer.open {
    display: block;
    max-height: 500px;
    opacity: 1;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.faq-answer-text {
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

.faq-item.active .faq-header {
    background-color: #f0f0ff;
    border-bottom-color: #667eea;
}

/* Ensure the sidebar containers don't force inner scrollbars across tabs */
.anchorkit-preview-sidebar-inner {
    max-height: none !important;
    overflow: visible !important;
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-container .anchorkit-toc-heading-level-2>.anchorkit-toc-link {
    font-size: var(--anchorkit-toc-h2-font-size, inherit);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-container .anchorkit-toc-heading-level-3>.anchorkit-toc-link {
    font-size: var(--anchorkit-toc-h3-font-size, inherit);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-container .anchorkit-toc-heading-level-4>.anchorkit-toc-link {
    font-size: var(--anchorkit-toc-h4-font-size, inherit);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-container .anchorkit-toc-heading-level-5>.anchorkit-toc-link {
    font-size: var(--anchorkit-toc-h5-font-size, inherit);
}

:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-container .anchorkit-toc-heading-level-6>.anchorkit-toc-link {
    font-size: var(--anchorkit-toc-h6-font-size, inherit);
}

/* Typography controls - line height, letter spacing, text transform */
:is(#anchorkit-sidebar-toc-preview, #toc-preview) .anchorkit-toc-link {
    line-height: var(--anchorkit-toc-line-height, 1.6) !important;
    letter-spacing: var(--anchorkit-toc-letter-spacing, 0) !important;
    text-transform: var(--anchorkit-toc-text-transform, none) !important;
}

/* ======================================
   Utility Classes - Replacing Inline Styles
   ====================================== */

/* Alert/Notice Boxes */
.anchorkit-notice {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
}

.anchorkit-notice-warning {
    background: #fff3cd;
    border-left: 3px solid #ff9800;
}

.anchorkit-notice-warning-alt {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.anchorkit-notice-info {
    background: #f0f6ff;
    border-radius: 4px;
}

.anchorkit-notice-info-bordered {
    background: #f0f6ff;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.anchorkit-notice-success {
    background: #e8f5e9;
    border-radius: 4px;
    border-left: 3px solid #4caf50;
}

.anchorkit-notice-link {
    color: #d68000;
    text-decoration: underline;
}

/* Screen Reader Only / Visually Hidden */
.anchorkit-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Alternative for display:none on labels */
label.anchorkit-hidden {
    display: none;
}

/* Conditional Display */
.anchorkit-conditional-hidden {
    display: none;
}

/* Info Box / Card Variants */
.anchorkit-info-card {
    background: #f8f9fa;
    border-left: 4px solid var(--md-sys-color-primary);
}

.anchorkit-info-card-header {
    margin-top: 0;
}

.anchorkit-info-card-description {
    margin-bottom: 12px;
}

.anchorkit-info-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.anchorkit-info-list-item {
    margin-bottom: 8px;
}

/* Custom Styling Info Box */
.anchorkit-custom-styling-info {
    padding: 24px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.anchorkit-custom-styling-info.warning {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
}

.anchorkit-custom-styling-info.info {
    background: #f0f6ff;
    border-left: 4px solid var(--md-sys-color-primary);
}

.anchorkit-custom-styling-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.anchorkit-custom-styling-content {
    flex: 1;
    width: 100%;
}

.anchorkit-custom-styling-header {
    margin: 0 0 12px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.anchorkit-custom-styling-icon {
    font-size: 32px;
    line-height: 1;
    display: inline-block;
    margin-right: 12px;
}

.anchorkit-custom-styling-description {
    margin: 0 0 16px 0;
    font-size: 15px;
    line-height: 1.6;
}

.anchorkit-custom-styling-note {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.anchorkit-custom-styling-toggle-wrapper {
    margin: 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 16px;
    border-radius: 8px;
}

.anchorkit-custom-styling-toggle-label {
    font-size: 16px;
    font-weight: 600;
}

.anchorkit-custom-styling-helper {
    margin-top: 8px;
    display: block;
}

/* Grid Layouts */
.anchorkit-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.anchorkit-grid-2col-last {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Spacing Utilities */
.anchorkit-mt-8 {
    margin-top: 8px;
}

.anchorkit-mt-12 {
    margin-top: 12px;
}

.anchorkit-mt-16 {
    margin-top: 16px;
}

.anchorkit-mb-16 {
    margin-bottom: 16px;
}

.anchorkit-mb-1_5rem {
    margin-bottom: 1.5rem;
}

.anchorkit-mt-neg-8 {
    margin-top: -8px;
}

/* Pro Section Styling */
.anchorkit-pro-hero {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    text-align: center;
    padding: 32px 32px 36px;
}

.anchorkit-pro-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    color: white;
}

.anchorkit-pro-description {
    font-size: 18px;
    margin: 0 0 20px 0;
}

.anchorkit-pro-hero-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
}

.anchorkit-pro-hero-badge-text {
    font-size: 18px;
}

/* Feature Comparison Table */
th.text-center {
    text-align: center;
    width: 120px;
}

/* Shadow Configuration */
.anchorkit-shadow-section-title {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 15px;
    font-weight: 600;
}

.anchorkit-shadow-section-description {
    margin-bottom: 1.5rem;
    display: block;
}

/* FAQ Section */
.anchorkit-faq-title {
    margin-bottom: 24px;
}

/* Disabled Field Styling */
.anchorkit-disabled-field {
    margin-top: 12px;
    opacity: 0.6;
}

.anchorkit-disabled-field-no-margin {
    opacity: 0.6;
}

/* Min Height Utilities */
.anchorkit-min-h-400 {
    min-height: 400px;
}

/* Helper Text Variants */
.helper-text.anchorkit-helper-spacing {
    margin: 8px 0 16px;
}

.helper-text.anchorkit-helper-bottom {
    margin-top: 0.5rem;
    display: block;
}

/* Field Error Variant */
.field-error-message.anchorkit-error-hidden {
    display: none;
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
}

/* ============================================
   CUSTOM TOC LABELS - Key-Value Interface  
   ============================================ */

.anchorkit-custom-labels-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.anchorkit-custom-label-row {
    display: grid;
    grid-template-columns: 1fr 28px 1fr 36px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.anchorkit-custom-label-row:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.anchorkit-custom-label-row input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.anchorkit-custom-label-row input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary, #5c6bc0);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
}

.anchorkit-custom-label-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
}

.anchorkit-remove-label-btn {
    background: #ef4444;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.anchorkit-remove-label-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.anchorkit-add-label-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--md-sys-color-primary, #5c6bc0);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
    /* Increased spacing from fields above */
}

.anchorkit-add-label-btn:hover {
    background: var(--md-sys-color-primary-dark, #3f51b5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(92, 107, 192, 0.2);
}

.anchorkit-add-label-btn svg {
    fill: currentColor;
}

.anchorkit-no-labels-message {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* ACF Fields Interface */
.anchorkit-acf-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.anchorkit-acf-field-row {
    display: grid;
    grid-template-columns: 1fr 36px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.anchorkit-acf-field-row:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.anchorkit-acf-field-row.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.anchorkit-acf-field-row input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: 'Courier New', monospace;
}

.anchorkit-acf-field-row input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary, #5c6bc0);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
}

.anchorkit-acf-field-row input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.anchorkit-remove-field-btn {
    background: #ef4444;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.anchorkit-remove-field-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.anchorkit-remove-field-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.anchorkit-add-field-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--md-sys-color-primary, #5c6bc0);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.anchorkit-add-field-btn:hover {
    background: var(--md-sys-color-primary-dark, #3f51b5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(92, 107, 192, 0.2);
}

.anchorkit-add-field-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.anchorkit-add-field-btn svg {
    fill: currentColor;
}

.anchorkit-no-fields-message {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* CSS Classes Interface */
.anchorkit-css-classes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.anchorkit-css-class-row {
    display: grid;
    grid-template-columns: 1fr 36px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.anchorkit-css-class-row:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.anchorkit-css-class-row.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.anchorkit-css-class-row input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: 'Courier New', monospace;
}

.anchorkit-css-class-row input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary, #5c6bc0);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
}

.anchorkit-css-class-row input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.anchorkit-remove-class-btn {
    background: #ef4444;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.anchorkit-remove-class-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.anchorkit-remove-class-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.anchorkit-add-class-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--md-sys-color-primary, #5c6bc0);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.anchorkit-add-class-btn:hover {
    background: var(--md-sys-color-primary-dark, #3f51b5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(92, 107, 192, 0.2);
}

.anchorkit-add-class-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.anchorkit-add-class-btn svg {
    fill: currentColor;
}

.anchorkit-no-classes-message {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* TOC Mobile Hidden Indicator */
.anchorkit-mobile-hidden-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
}

[data-theme="dark"] .anchorkit-mobile-hidden-indicator {
    background: rgba(255, 255, 255, 0.1);
}

.indicator-content {
    background: #fff;
    color: #333;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    animation: slideUp 0.3s ease-out;
}

[data-theme="dark"] .indicator-content {
    background: #2c2c2c;
    color: #fff;
}

.indicator-content svg {
    color: #ff9800;
    width: 32px;
    height: 32px;
}

.indicator-content span {
    font-weight: 600;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

#toc-preview.is-hidden-on-mobile {
    position: relative;
    min-height: 200px;
}

/* Help Tab Styles */
.anchorkit-shortcode-examples h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d2327;
    margin: 1rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anchorkit-shortcode-examples code {
    display: block;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.5rem 0 1rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #1d2327;
    word-break: break-all;
}

.anchorkit-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.attribute-category {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 0.75rem;
}

.attribute-category strong {
    display: block;
    font-size: 0.85rem;
    color: #1d2327;
    margin-bottom: 0.5rem;
}

.attribute-category code {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    margin: 0.125rem;
    display: inline-block;
}

.anchorkit-hooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.hook-category {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 1rem;
}

.hook-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.anchorkit-hook-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.anchorkit-hook-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.4;
}

.anchorkit-hook-list li:last-child {
    border-bottom: none;
}

.anchorkit-hook-list code {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1d2327;
}

pre code {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 1rem;
    display: block;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
}

/* Code Examples Styling */
.anchorkit-code-examples h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d2327;
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.anchorkit-code-examples pre {
    margin: 0.5rem 0 1.5rem 0;
}

.anchorkit-code-examples pre code {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    padding: 0.75rem;
}

/* Responsive adjustments for help tab */
@media (max-width: 782px) {
    .anchorkit-attributes-grid,
    .anchorkit-hooks-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .anchorkit-shortcode-examples code {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}
