/* ========================================
   SEO FURY — Post Meta UI 2026
   Aligned with admin design system
======================================== */

:root {
    --sf-primary: #4F46E5;
    --sf-primary-dark: #4338CA;
    --sf-primary-light: #EEF2FF;
    --sf-primary-50: #E8E5FF;
    --sf-accent: #F59E0B;
    --sf-accent-light: #FEF3C7;
    --sf-success: #10B981;
    --sf-success-light: #ECFDF5;
    --sf-danger: #EF4444;
    --sf-danger-light: #FEF2F2;
    --sf-warning: #F59E0B;
    --sf-warning-light: #FFFBEB;
    --sf-dark: #0F172A;
    --sf-gray-900: #1E293B;
    --sf-gray-700: #334155;
    --sf-gray-500: #64748B;
    --sf-gray-400: #94A3B8;
    --sf-gray-300: #CBD5E1;
    --sf-gray-200: #E2E8F0;
    --sf-gray-100: #F1F5F9;
    --sf-gray-50: #F8FAFC;
    --sf-white: #FFFFFF;
    --sf-radius: 12px;
    --sf-radius-sm: 8px;
    --sf-radius-xs: 6px;
    --sf-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --sf-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --sf-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --sf-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --sf-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   GUTENBERG: HIDE BOTTOM METABOX
======================================== */

/* CSS-first approach: hide ONLY in the bottom metaboxes area of Gutenberg.
   The #seo_fury_post_meta will be moved into .seo-fury-sidebar by JS,
   so we must NOT hide it globally — only when it's still at the bottom. */
body.seo-fury-gutenberg-active .edit-post-layout__metaboxes #seo_fury_post_meta,
body.block-editor-page .edit-post-layout__metaboxes #seo_fury_post_meta,
body.block-editor-page .edit-post-layout__metaboxes #normal-sortables #seo_fury_post_meta {
    display: none !important;
}

/* Ensure metabox is visible when moved into the sidebar */
.seo-fury-sidebar #seo_fury_post_meta,
#seo-fury-sidebar-container #seo_fury_post_meta {
    display: block !important;
}

/* ========================================
   WRAPPER
======================================== */

.seo-fury-wrapper {
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    box-shadow: var(--sf-shadow-sm);
    font-family: var(--sf-font);
}

/* Content */
.seo-fury-content {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

/* ========================================
   TABS
======================================== */

.seo-fury-tabs {
    display: flex;
    border-bottom: 1px solid var(--sf-gray-200);
    background: var(--sf-gray-50);
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

@media screen and (max-width: 782px) {
    .seo-fury-tabs {
        top: 0;
    }
}

.seo-fury-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--sf-gray-500);
    transition: var(--sf-transition);
    font-family: var(--sf-font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.seo-fury-tab:hover {
    background: var(--sf-gray-100);
    color: var(--sf-gray-700);
}

.seo-fury-tab.active {
    color: var(--sf-primary);
    border-bottom-color: var(--sf-primary);
    background: var(--sf-white);
    font-weight: 600;
}

/* ========================================
   TAB PANELS
======================================== */

.seo-fury-tab-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.seo-fury-tab-content {
    display: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    animation: sfFadeIn 0.3s ease;
}

.seo-fury-tab-content.active {
    display: block;
}

@keyframes sfFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   SECTIONS
======================================== */

.seo-fury-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--sf-gray-50);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
}

.seo-fury-section:last-child {
    margin-bottom: 0;
}

.seo-fury-section h4 {
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-gray-900);
    border-bottom: 2px solid var(--sf-primary);
}

/* ========================================
   FIELDS
======================================== */

.seo-fury-edit-snippet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.seo-fury-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.seo-fury-field {
    margin-bottom: 16px;
}

.seo-fury-fields-grid .seo-fury-field {
    margin-bottom: 0;
}

.seo-fury-field:last-child {
    margin-bottom: 0;
}

.seo-fury-field .field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.seo-fury-pixel-counter {
    margin-left: 8px;
    color: var(--sf-gray-400);
    font-size: 11px;
}

.seo-fury-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--sf-gray-900);
}

.seo-fury-field .field-header label {
    margin-bottom: 0;
}

.seo-fury-field input[type="text"],
.seo-fury-field input[type="url"],
.seo-fury-field input[type="number"],
.seo-fury-field textarea,
.seo-fury-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    font-size: 13px;
    font-family: var(--sf-font);
    color: var(--sf-gray-900);
    background: var(--sf-white);
    transition: var(--sf-transition);
}

.seo-fury-field input[type="text"]:focus,
.seo-fury-field input[type="url"]:focus,
.seo-fury-field input[type="number"]:focus,
.seo-fury-field textarea:focus,
.seo-fury-field select:focus {
    border-color: var(--sf-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.seo-fury-field textarea {
    resize: vertical;
    min-height: 60px;
}

.seo-fury-field .description {
    margin-top: 6px;
    font-size: 12px;
    color: var(--sf-gray-500);
    font-style: italic;
}

.seo-fury-field .description code {
    background: var(--sf-gray-100);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #d63384;
    font-family: monospace;
}

/* ========================================
   SEO ANALYSIS
======================================== */

.seo-fury-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.seo-fury-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--sf-gray-100);
    color: var(--sf-gray-700);
    letter-spacing: 0.2px;
}

.seo-fury-score--good {
    background: var(--sf-success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.seo-fury-score--ok {
    background: var(--sf-primary-light);
    color: var(--sf-primary-dark);
    border: 1px solid #c7d2fe;
}

.seo-fury-score--warn {
    background: var(--sf-warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Overall SEO score hero (top of the Basic tab) */
.seo-fury-overall {
    padding: 0;
    border: none;
    background: transparent;
}
.seo-fury-overall-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--sf-gray-50, #f8fafc);
    border: 1px solid var(--sf-gray-200, #e5e7eb);
}
.seo-fury-overall-gauge {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid currentColor;
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-weight: 800;
}
.seo-fury-overall-value {
    font-size: 24px;
    line-height: 1;
}
.seo-fury-overall-max {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 1px;
}
.seo-fury-overall-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.seo-fury-overall-info strong {
    font-size: 14px;
}
.seo-fury-overall-info .description {
    margin: 0;
    font-size: 12px;
}

/* Duplicate meta warning */
.seo-fury-dup-warning {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--sf-warning-light, #fffbeb);
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    line-height: 1.5;
}
.seo-fury-dup-warning a {
    color: #92400e;
    font-weight: 600;
}

/* Search Console per-post snippet */
.seo-fury-gsc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.seo-fury-gsc-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: 8px;
    background: var(--sf-gray-50, #f8fafc);
    border: 1px solid var(--sf-gray-200, #e5e7eb);
}
.seo-fury-gsc-grid .v {
    font-size: 18px;
    font-weight: 800;
    color: var(--sf-gray-800, #1f2937);
}
.seo-fury-gsc-grid .l {
    font-size: 11px;
    color: var(--sf-gray-500, #64748b);
    margin-top: 2px;
}

.seo-fury-analysis-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.seo-fury-analysis-footer {
    margin-top: 8px;
    font-size: 12px;
    color: var(--sf-gray-500);
}

.seo-fury-analysis-metric strong {
    color: var(--sf-gray-900);
}

/* Meter Bar */
.seo-fury-meter {
    margin-top: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--sf-gray-200);
    overflow: hidden;
}

.seo-fury-meter-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--sf-gray-300);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.seo-fury-meter-bar.is-good {
    background: var(--sf-success);
}

.seo-fury-meter-bar.is-ok {
    background: var(--sf-primary);
}

.seo-fury-meter-bar.is-warn {
    background: var(--sf-warning);
}

/* Analysis Items */
.seo-fury-analysis-item {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: var(--sf-radius-xs);
    background: var(--sf-gray-50);
    border: 1px solid var(--sf-gray-200);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--sf-transition);
}

.seo-fury-analysis-item::before {
    content: "\2022";
    font-weight: 700;
    font-size: 12px;
}

.seo-fury-analysis-item.is-ok {
    background: var(--sf-success-light);
    border-color: #a7f3d0;
    color: #065f46;
}

.seo-fury-analysis-item.is-warn {
    background: var(--sf-warning-light);
    border-color: #fde68a;
    color: #92400e;
}

.seo-fury-analysis-item.is-ok::before {
    content: "\2713";
    color: var(--sf-success);
}

.seo-fury-analysis-item.is-warn::before {
    content: "!";
    color: var(--sf-warning);
}

.seo-fury-analysis-item.is-partial {
    background: #FFF7ED;
    border-color: #FDBA74;
    color: #9A3412;
}

.seo-fury-analysis-item.is-partial::before {
    content: "~";
    color: #D97706;
}

/* ========================================
   SCHEMA
======================================== */

.schema-json-preview pre {
    background: var(--sf-dark);
    color: #e2e8f0;
    padding: 14px;
    border-radius: var(--sf-radius-sm);
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
}

#seo_fury_schema_custom {
    font-family: monospace;
    background: var(--sf-gray-50);
}

.seo-fury-schema-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.seo-fury-schema-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    background: var(--sf-white);
    gap: 10px;
    transition: var(--sf-transition);
}

.seo-fury-schema-card:hover {
    box-shadow: var(--sf-shadow-sm);
}

.seo-fury-schema-card.is-active {
    border-color: var(--sf-primary);
    background: var(--sf-primary-light);
}

.seo-fury-schema-icon {
    color: var(--sf-primary);
    flex-shrink: 0;
}

.seo-fury-schema-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.seo-fury-schema-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sf-primary-light);
    color: var(--sf-primary-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.seo-fury-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.seo-fury-schema-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.seo-fury-schema-label-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}


.seo-fury-highlight {
    outline: 2px solid rgba(79, 70, 229, 0.4);
    outline-offset: 2px;
    border-radius: var(--sf-radius-xs);
    transition: outline-color 0.2s ease;
}

.seo-fury-focus-highlight {
    background: var(--sf-accent-light);
    color: var(--sf-gray-900);
    padding: 0 2px;
    border-radius: 3px;
}

.seo-fury-schema-error {
    color: var(--sf-danger);
}

/* Article Schema date field toggle */
.sf-schema-date-field {
    margin-top: 4px;
}

.sf-date-auto-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    line-height: 1.6;
}

.sf-date-wp-value {
    font-weight: 500;
    color: var(--sf-gray-800);
    font-size: 13px;
}

.sf-date-wp-label {
    font-size: 12px;
    color: var(--sf-gray-500);
}

.sf-schema-date-custom-btn,
.sf-schema-date-wp-btn {
    font-size: 12px;
    color: var(--sf-primary);
    text-decoration: none;
    display: inline-block;
    margin-top: 2px;
}

.sf-schema-date-custom-btn:hover,
.sf-schema-date-wp-btn:hover {
    text-decoration: underline;
    color: var(--sf-primary-dark);
}

.sf-date-custom-row input[type="datetime-local"] {
    max-width: 220px;
}

/* ── Optional schema field toggles (sameAs, knowsAbout, alumniOf, hasCredential) ── */
.sf-subgroup-header {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
    margin-top: 6px;
    border-top: 2px solid var(--sf-primary-light);
}

.sf-subgroup-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sf-gray-200);
}

.sf-subgroup-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sf-primary);
    background: var(--sf-primary-light);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.sf-opt-item {
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    overflow: hidden;
}

.sf-opt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--sf-gray-50);
}

.sf-opt-header .description {
    margin: 0;
    flex: 1;
    font-size: 12px;
    color: var(--sf-gray-500);
    line-height: 1.4;
}

.sf-opt-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--sf-gray-100);
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    color: var(--sf-gray-700);
    transition: var(--sf-transition);
    flex-shrink: 0;
    white-space: nowrap;
}

.sf-opt-toggle-btn code {
    font-size: 12px;
    font-family: monospace;
    color: var(--sf-primary);
    background: none;
    padding: 0;
}

.sf-opt-toggle-btn .sf-opt-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    margin-top: -2px;
    flex-shrink: 0;
}

.sf-opt-toggle-btn.active .sf-opt-arrow {
    transform: rotate(45deg);
    margin-top: -4px;
}

.sf-opt-toggle-btn:hover {
    background: var(--sf-primary-light);
    border-color: var(--sf-primary);
    color: var(--sf-primary-dark);
}

.sf-opt-toggle-btn.active {
    background: var(--sf-primary-light);
    border-color: var(--sf-primary);
    color: var(--sf-primary-dark);
}

.sf-opt-body {
    padding: 12px;
    border-top: 1px solid var(--sf-gray-200);
    background: #fff;
}

.sf-opt-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sf-opt-fixed-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: var(--sf-gray-50);
    border-radius: var(--sf-radius-xs);
    border: 1px solid var(--sf-gray-200);
}

.sf-opt-fixed-field {
    font-size: 12px;
    color: var(--sf-gray-600, var(--sf-gray-500));
}

.sf-opt-fixed-field code {
    font-size: 12px;
    color: var(--sf-primary);
}

.sf-opt-fixed-field span {
    color: var(--sf-gray-700);
}

/* Array list items */
.sf-array-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.sf-array-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sf-array-row input[type="text"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    font-size: 13px;
    font-family: inherit;
    color: var(--sf-gray-900);
    background: #fff;
    transition: border-color 0.15s;
}

.sf-array-row input[type="text"]:focus {
    outline: none;
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.sf-array-remove-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    cursor: pointer;
    color: var(--sf-gray-500);
    font-size: 14px;
    line-height: 1;
    transition: var(--sf-transition);
    padding: 0;
}

.sf-array-remove-btn:hover {
    background: #FEF2F2;
    border-color: var(--sf-danger);
    color: var(--sf-danger);
}

.sf-array-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--sf-primary-light);
    border: 1px solid var(--sf-primary);
    border-radius: var(--sf-radius-xs);
    font-size: 12px;
    font-weight: 600;
    color: var(--sf-primary);
    cursor: pointer;
    transition: var(--sf-transition);
    font-family: inherit;
}

.sf-array-add-btn:hover {
    background: var(--sf-primary);
    color: #fff;
}

.sf-opt-body .seo-fury-field {
    margin-bottom: 0;
}

.seo-fury-icon-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--sf-primary);
    border-radius: var(--sf-radius-xs);
    transition: var(--sf-transition);
}

.seo-fury-icon-link:hover {
    background: var(--sf-primary-light);
    color: var(--sf-primary-dark);
}

.seo-fury-icon-link .dashicons {
    margin: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.seo-fury-schema-actions .button {
    font-size: 12px;
    padding: 4px 10px;
}

.seo-fury-schema-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.seo-fury-schema-type-card {
    border: 1px solid var(--sf-gray-200);
    background: var(--sf-white);
    border-radius: var(--sf-radius-sm);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
    color: var(--sf-gray-700);
    transition: var(--sf-transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.seo-fury-schema-type-card:hover {
    border-color: rgba(79, 70, 229, 0.4);
    background: var(--sf-gray-50);
    box-shadow: var(--sf-shadow-sm);
}

.seo-fury-schema-type-card.is-active {
    border-color: var(--sf-primary);
    background: var(--sf-primary-light);
    color: var(--sf-primary-dark);
}

.seo-fury-schema-type-name {
    font-weight: 600;
}

.seo-fury-schema-apply {
    font-size: 11px;
    padding: 4px 8px;
}

/* Checkboxes */
.seo-fury-field input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.seo-fury-field label input[type="checkbox"] {
    display: inline-block;
    width: auto;
}

.seo-fury-pill-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sf-gray-700);
}

/* ========================================
   CHAR COUNTER
======================================== */

.char-counter {
    font-size: 12px;
    color: var(--sf-gray-500);
    white-space: nowrap;
}

.char-counter span {
    font-weight: 600;
}

#title-length,
#description-length {
    color: var(--sf-success);
    font-weight: 700;
}

/* ========================================
   GOOGLE PREVIEW
======================================== */

.google-preview {
    padding: 16px;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    font-family: Arial, sans-serif;
    box-shadow: var(--sf-shadow-sm);
}

.preview-url {
    color: #202124;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.preview-title {
    color: #1a0dab;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 4px;
    cursor: pointer;
    font-weight: 400;
}

.preview-title:hover {
    text-decoration: underline;
}

.preview-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
}

/* ========================================
   SOCIAL PREVIEWS — FACEBOOK
======================================== */

.og-preview,
.facebook-preview {
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    overflow: hidden;
    background: var(--sf-white);
    max-width: 500px;
    margin-bottom: 20px;
    box-shadow: var(--sf-shadow-sm);
}

.og-image,
.fb-image {
    width: 100%;
    background: var(--sf-gray-100);
    max-height: 262px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.og-image img,
.fb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.og-content,
.fb-content {
    padding: 12px;
    background: #f2f3f5;
}

.og-title,
.fb-title {
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 5px;
    line-height: 1.2;
}

.og-description,
.fb-description {
    font-size: 14px;
    color: #606770;
    margin-bottom: 5px;
    line-height: 1.3;
}

.og-url,
.fb-url {
    font-size: 12px;
    color: #606770;
    text-transform: uppercase;
}

/* ========================================
   SOCIAL PREVIEWS — TWITTER
======================================== */

.twitter-preview {
    border: 1px solid #cfd9de;
    border-radius: 16px;
    overflow: hidden;
    background: var(--sf-white);
    max-width: 500px;
    margin-bottom: 20px;
    box-shadow: var(--sf-shadow-sm);
}

.tw-image {
    width: 100%;
    background: #f7f9f9;
    max-height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tw-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tw-content {
    padding: 12px;
}

.tw-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f1419;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tw-description {
    font-size: 15px;
    color: #536471;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tw-url {
    font-size: 15px;
    color: #536471;
}

/* ========================================
   IMAGE UPLOAD
======================================== */

.sf-upload-image {
    margin-top: 8px;
}

.sf-image-preview {
    margin-top: 12px;
    padding: 10px;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-xs);
}

.sf-image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sf-radius-xs);
    display: block;
}

/* ========================================
   MODAL — WIDE & MODERN 2026
======================================== */

.seo-fury-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
}

.seo-fury-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    animation: sfFadeIn 0.2s ease;
    z-index: 10000000;
}

.seo-fury-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--sf-white);
    border-radius: 16px;
    z-index: 10000001;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    animation: sfModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes sfModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.seo-fury-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--sf-gray-200);
    background: var(--sf-white);
    flex-shrink: 0;
}

.seo-fury-modal-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--sf-gray-900);
    font-family: var(--sf-font);
    letter-spacing: -0.01em;
}

.seo-fury-modal-close {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--sf-radius-xs);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--sf-transition);
}

.seo-fury-modal-close:hover {
    background: var(--sf-gray-100);
    border-color: var(--sf-gray-200);
}

.seo-fury-modal-close .dashicons {
    color: #64748B !important;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.seo-fury-modal-close:hover .dashicons {
    color: #1E293B !important;
}

/* Modal Body */
.seo-fury-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.seo-fury-modal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--sf-gray-200);
    margin-bottom: 20px;
}

.seo-fury-modal-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    font-size: 13px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--sf-gray-500);
    font-family: var(--sf-font);
    font-weight: 500;
    transition: var(--sf-transition);
    border-radius: 6px 6px 0 0;
}

.seo-fury-modal-tab:hover {
    color: var(--sf-gray-700);
    background: var(--sf-gray-50);
}

.seo-fury-modal-tab.active {
    color: var(--sf-primary);
    border-bottom-color: var(--sf-primary);
    font-weight: 600;
    background: transparent;
}

.seo-fury-modal-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.seo-fury-modal-tab-panels .seo-fury-modal-panel {
    display: none;
}

.seo-fury-modal-tab-panels .seo-fury-modal-panel.active {
    display: block;
}

/* Modal Grid — General Tab */
.seo-fury-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 16px;
}

.seo-fury-modal-grid-left,
.seo-fury-modal-grid-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* Modal Preview */
.seo-fury-modal-preview {
    margin-bottom: 12px;
}

.seo-fury-modal-preview h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--sf-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.google-preview-modal {
    padding: 16px;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    width: 100%;
    box-shadow: var(--sf-shadow-sm);
    overflow: hidden;
}

.google-preview-modal .preview-url {
    font-size: 13px;
    margin-bottom: 4px;
}

.google-preview-modal .preview-title {
    font-size: 18px;
    margin-bottom: 4px;
}

.google-preview-modal .preview-description {
    font-size: 13px;
    line-height: 1.5;
}

/* Modal fields spacing */
.seo-fury-modal-grid-left .seo-fury-field:first-of-type,
.seo-fury-modal-grid-right .seo-fury-field:first-of-type {
    margin-top: 0;
}

.seo-fury-modal-grid-right .seo-fury-field {
    margin-top: 14px;
}

.seo-fury-modal-grid-right .seo-fury-field:first-of-type {
    margin-top: 0;
}

/* Modal field compactness */
.seo-fury-modal-body .seo-fury-field {
    margin-bottom: 12px;
}

.seo-fury-modal-body .seo-fury-field:last-child {
    margin-bottom: 0;
}

.seo-fury-modal-body .seo-fury-field label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--sf-gray-700);
}

.seo-fury-modal-body .seo-fury-field input[type="text"],
.seo-fury-modal-body .seo-fury-field input[type="url"],
.seo-fury-modal-body .seo-fury-field textarea {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--sf-radius-sm);
    border: 1.5px solid var(--sf-gray-200);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.seo-fury-modal-body .seo-fury-field input[type="text"]:focus,
.seo-fury-modal-body .seo-fury-field input[type="url"]:focus,
.seo-fury-modal-body .seo-fury-field textarea:focus {
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.seo-fury-modal-body .input-with-dropdown {
    align-items: stretch;
}

.seo-fury-modal-body .shortcode-dropdown-btn {
    height: 36px;
    align-self: flex-start;
    border-radius: var(--sf-radius-sm);
}

/* Social section in modal */
.seo-fury-modal-body .seo-fury-section {
    border-radius: var(--sf-radius-sm);
    border: 1px solid var(--sf-gray-200);
    background: var(--sf-gray-50);
    padding: 18px;
}

.seo-fury-modal-body .seo-fury-section h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sf-primary);
    color: var(--sf-gray-900);
}

/* Social fields grid in modal */
.seo-fury-modal-body .seo-fury-fields-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Z-index fixes when modal is open */
body.modal-open .edit-post-header,
body.modal-open .interface-interface-skeleton__header,
body.modal-open #wpadminbar,
body.modal-open .edit-post-layout__metaboxes .postbox-header {
    z-index: 0 !important;
    pointer-events: none;
    visibility: visible;
}

body.modal-open .components-panel__header,
body.modal-open .interface-complementary-area-header {
    z-index: 0 !important;
    pointer-events: none;
    visibility: visible;
}

body.modal-open .interface-interface-skeleton__sidebar,
body.modal-open .edit-post-sidebar {
    z-index: 1 !important;
}

body.modal-open .edit-post-sidebar-header,
body.modal-open .edit-post-sidebar__panel-tab {
    display: none !important;
}

body.modal-open .edit-post-sidebar__panel-tabs,
body.modal-open .edit-post-sidebar__panel-tabs .components-panel__header {
    display: none !important;
}

body.modal-open .media-modal-backdrop {
    z-index: 10000002 !important;
}

body.modal-open .media-modal {
    z-index: 10000003 !important;
}

.seo-fury-hidden {
    display: none !important;
}

/* Schema Modal Tabs */
.seo-fury-schema-modal-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--sf-gray-200);
    margin-bottom: 16px;
}

.seo-fury-schema-modal-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--sf-gray-500);
    font-family: var(--sf-font);
    transition: var(--sf-transition);
}

.seo-fury-schema-modal-tab.active {
    color: var(--sf-primary);
    border-bottom-color: var(--sf-primary);
}

.seo-fury-schema-modal-panel {
    display: none;
}

.seo-fury-schema-modal-panel.active {
    display: block;
}

.seo-fury-modal-body .seo-fury-field textarea {
    min-height: 50px;
}

.seo-fury-modal-body .seo-fury-field .description {
    margin-top: 4px;
    font-size: 11px;
}

.seo-fury-modal-body .char-counter {
    font-size: 11px;
}

/* Modal Footer */
.seo-fury-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--sf-gray-200);
    background: var(--sf-gray-50);
    flex-shrink: 0;
}

.seo-fury-modal-footer .button {
    min-width: 110px;
    padding: 8px 20px;
    height: auto;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: var(--sf-radius-sm);
    font-family: var(--sf-font);
    font-weight: 500;
    font-size: 13px;
    transition: var(--sf-transition);
}

.seo-fury-modal-footer .button-primary {
    background: var(--sf-primary) !important;
    border-color: var(--sf-primary) !important;
    color: var(--sf-white) !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.seo-fury-modal-footer .button-primary:hover {
    background: var(--sf-primary-dark) !important;
    border-color: var(--sf-primary-dark) !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.seo-fury-modal-footer .button:not(.button-primary):hover {
    background: var(--sf-gray-100);
    border-color: var(--sf-gray-300);
}

/* ========================================
   SOCIAL PREVIEW TABS
======================================== */

.seo-fury-social-preview-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.seo-fury-social-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 500;
    border: 1.5px solid var(--sf-gray-200);
    border-radius: 999px;
    background: var(--sf-white);
    cursor: pointer;
    color: var(--sf-gray-500);
    transition: var(--sf-transition);
    font-family: var(--sf-font);
}

.seo-fury-social-tab .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.seo-fury-social-tab:hover {
    border-color: var(--sf-gray-300);
    color: var(--sf-gray-700);
    background: var(--sf-gray-50);
}

.seo-fury-social-tab.active {
    border-color: var(--sf-primary);
    color: var(--sf-primary);
    background: var(--sf-primary-light);
    font-weight: 600;
}

.seo-fury-social-panel {
    display: none;
}

.seo-fury-social-panel.active {
    display: block;
}

.seo-fury-social-settings-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 4px;
    background: var(--sf-gray-100);
    border-radius: var(--sf-radius-sm);
}

.seo-fury-modal-social-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.seo-fury-modal-social-left,
.seo-fury-modal-social-right {
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .seo-fury-modal-social-grid {
        grid-template-columns: 1fr;
    }
}

.seo-fury-social-settings-tab {
    background: transparent;
    border: none;
    border-radius: var(--sf-radius-xs);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    cursor: pointer;
    color: var(--sf-gray-500);
    font-family: var(--sf-font);
    transition: var(--sf-transition);
    flex: 1;
    text-align: center;
}

.seo-fury-social-settings-tab:hover {
    color: var(--sf-gray-700);
    background: var(--sf-gray-200);
}

.seo-fury-social-settings-tab.active {
    color: var(--sf-primary);
    background: var(--sf-white);
    box-shadow: var(--sf-shadow-sm);
    font-weight: 600;
}

.seo-fury-social-settings-panel {
    display: none;
}

.seo-fury-social-settings-panel.active {
    display: block;
}

/* ========================================
   SHORTCODES HELP
======================================== */

.seo-fury-shortcodes-help {
    margin-top: 16px;
    padding: 14px;
    background: var(--sf-primary-light);
    border: 1px solid #c7d2fe;
    border-radius: var(--sf-radius-sm);
}

.seo-fury-shortcodes-help h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-primary-dark);
    text-align: center;
}

.seo-fury-shortcodes-help ul.variables-grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.seo-fury-shortcodes-help li {
    margin: 0;
    font-size: 11px;
    color: var(--sf-gray-700);
}

.seo-fury-shortcodes-help code.variable-item {
    background: #c7d2fe;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--sf-primary-dark);
    font-family: monospace;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sf-transition);
    display: inline-block;
}

.seo-fury-shortcodes-help code.variable-item:hover {
    background: var(--sf-primary);
    color: var(--sf-white);
    transform: scale(1.05);
}

/* ========================================
   SCROLLBAR
======================================== */

.seo-fury-tab-panels::-webkit-scrollbar,
.seo-fury-modal-body::-webkit-scrollbar {
    width: 6px;
}

.seo-fury-tab-panels::-webkit-scrollbar-track,
.seo-fury-modal-body::-webkit-scrollbar-track {
    background: var(--sf-gray-100);
}

.seo-fury-tab-panels::-webkit-scrollbar-thumb,
.seo-fury-modal-body::-webkit-scrollbar-thumb {
    background: var(--sf-gray-400);
    border-radius: 999px;
}

.seo-fury-tab-panels::-webkit-scrollbar-thumb:hover,
.seo-fury-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--sf-gray-500);
}

/* ========================================
   SHORTCODE DROPDOWN
======================================== */

.input-with-dropdown {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.input-with-dropdown input,
.input-with-dropdown textarea {
    flex: 1;
}

.shortcode-dropdown-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--sf-gray-100);
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sf-transition);
}

.shortcode-dropdown-btn:hover {
    background: var(--sf-gray-200);
    border-color: var(--sf-primary);
}

.shortcode-dropdown-btn.active {
    background: var(--sf-primary);
    border-color: var(--sf-primary);
}

.shortcode-dropdown-btn .dashicons {
    color: var(--sf-gray-500);
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.shortcode-dropdown-btn.active .dashicons {
    color: var(--sf-white);
    transform: rotate(180deg);
}

.input-with-dropdown:has(textarea) .shortcode-dropdown-btn {
    margin-top: 0;
}

.shortcode-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-sm);
    box-shadow: var(--sf-shadow-lg);
    z-index: 1000;
    width: 420px;
    max-height: 360px;
    overflow-y: auto;
    display: none;
}

.shortcode-dropdown-menu.active {
    display: block;
    animation: sfSlideDown 0.2s ease;
}

@keyframes sfSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search in shortcode dropdown */
.sf-shortcode-search-wrap {
    padding: 8px 10px;
    border-bottom: 1px solid var(--sf-gray-200);
    position: sticky;
    top: 0;
    background: var(--sf-white);
    z-index: 1;
}

.sf-shortcode-search {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--sf-gray-300);
    border-radius: var(--sf-radius-xs);
    font-size: 12px;
    font-family: var(--sf-font);
    color: var(--sf-gray-900);
    background: var(--sf-gray-50);
    outline: none;
    box-sizing: border-box;
}

.sf-shortcode-search:focus {
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.shortcode-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--sf-gray-100);
    transition: var(--sf-transition);
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shortcode-item-info {
    flex: 1;
    min-width: 0;
}

.shortcode-item-var {
    flex-shrink: 0;
    font-size: 11px;
    font-family: monospace;
    color: var(--sf-primary);
    background: var(--sf-primary-light);
    padding: 2px 8px;
    border-radius: var(--sf-radius-xs);
    white-space: nowrap;
}

.shortcode-item:last-child {
    border-bottom: none;
}

.shortcode-item-info strong,
.shortcode-item > strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-primary);
    margin-bottom: 3px;
    font-family: monospace;
}

.shortcode-item-info span,
.shortcode-item > span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--sf-gray-500);
    line-height: 1.3;
}

.shortcode-item:hover {
    background: var(--sf-primary-light);
}

.shortcode-item:hover strong {
    color: var(--sf-primary-dark);
}

.shortcode-item:active {
    background: var(--sf-primary-50);
}

/* ========================================
   SCHEMA VALIDATOR LINKS
======================================== */

.seo-fury-schema-validators {
    margin-top: 12px;
}

.seo-fury-validator-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.seo-fury-validator-link {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    text-decoration: none !important;
    font-size: 12px;
    padding: 4px 10px;
}

.seo-fury-validator-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* ========================================
   SCHEMA CUSTOM BUILDER
======================================== */

/* Schema Builder — Type input wrap */
.schema-builder-type-wrap {
    margin-bottom: 16px;
}

.schema-builder-type-wrap label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.schema-builder-type-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 400px;
}

.schema-builder-type-input {
    flex: 1;
    min-width: 0;
}

/* Schema Types Dropdown */
.schema-types-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.schema-types-dropdown-btn {
    padding: 2px 8px !important;
    min-height: 30px !important;
}

.schema-types-dropdown-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.schema-types-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    width: 280px;
    max-height: 360px;
    background: #fff;
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.schema-types-search-wrap {
    padding: 8px;
    border-bottom: 1px solid var(--sf-gray-100);
}

.schema-types-search-wrap input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--sf-gray-200);
    border-radius: 4px;
    font-size: 13px;
}

.schema-types-list {
    overflow-y: auto;
    max-height: 300px;
    padding: 4px 0;
}

.schema-types-item {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--sf-gray-700, #374151);
    transition: background 0.15s;
}

.schema-types-item:hover {
    background: var(--sf-primary-light, #EEF2FF);
    color: var(--sf-primary, #4F46E5);
}

/* Schema Builder — Row */
.schema-builder-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.schema-builder-drag {
    flex: 0 0 auto;
    cursor: grab;
    color: var(--sf-gray-400, #9CA3AF);
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.schema-builder-drag:hover {
    color: var(--sf-gray-600, #4B5563);
}

.schema-builder-key {
    flex: 0 0 140px;
    min-width: 0;
}

.schema-builder-value-wrap {
    flex: 1;
    min-width: 0;
}

.schema-builder-value-type {
    flex: 0 0 90px;
}

/* Row actions: move up/down + delete */
.schema-builder-row-actions {
    display: flex;
    gap: 2px;
    flex: 0 0 auto;
}

.schema-builder-row-actions .button {
    padding: 2px 4px !important;
    min-height: 26px !important;
    min-width: 26px !important;
    line-height: 1 !important;
}

.schema-builder-row-actions .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
    color: var(--sf-gray-500);
}

.schema-builder-move-up:hover .dashicons,
.schema-builder-move-down:hover .dashicons {
    color: var(--sf-primary, #4F46E5);
}

.schema-builder-remove:hover .dashicons,
.schema-builder-remove-group:hover .dashicons {
    color: #dc3545;
}

/* Schema Builder — Group */
.schema-builder-group {
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius);
    padding: 12px;
    margin-bottom: 12px;
    background: var(--sf-gray-50);
}

/* Nested groups: deeper indentation */
.schema-builder-group .schema-builder-group {
    background: #fff;
    border-color: var(--sf-gray-200);
}

.schema-builder-group .schema-builder-group .schema-builder-group {
    background: var(--sf-gray-50);
}

.schema-builder-group-header {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sf-gray-200);
}

.schema-builder-group-key {
    flex: 1;
    min-width: 0;
}

.schema-builder-group-type {
    flex: 0 0 150px;
}

.schema-builder-group-rows {
    padding-left: 12px;
    border-left: 2px solid var(--sf-primary-light);
}

/* Group actions (add property + add subgroup) */
.schema-builder-group-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.schema-builder-group-actions .button {
    font-size: 12px !important;
}

/* Top-level builder actions */
.schema-builder-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Preview */
.schema-builder-preview {
    margin-top: 16px;
}

.schema-builder-preview pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 12px;
    border-radius: var(--sf-radius);
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

/* ========================================
   SOCIAL POST CARDS
======================================== */

.social-tab-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-preview-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.social-preview-column {
    display: flex;
    flex-direction: column;
}

.social-settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.social-settings-column {
    display: flex;
    flex-direction: column;
}

.social-preview-column .seo-fury-section,
.social-settings-column .seo-fury-section {
    margin-bottom: 0;
}

.social-post-card {
    width: 100%;
    max-width: 100%;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
    margin-bottom: 0;
    transition: box-shadow 0.2s ease;
}

.social-post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
}

.social-post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.social-post-meta {
    flex: 1;
}

.social-post-meta .social-username {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #050505;
    line-height: 1.3;
}

.social-post-meta .social-time,
.social-post-meta .social-handle {
    font-size: 13px;
    color: var(--sf-gray-500);
    margin-top: 2px;
    display: block;
}

.social-post-text {
    padding: 0 16px 12px;
    font-size: 15px;
    color: #050505;
    line-height: 1.4;
}

.social-post-image {
    width: 100%;
    overflow: hidden;
}

.social-post-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.social-post-footer {
    padding: 12px 16px;
}

.social-link-domain {
    font-size: 12px;
    color: var(--sf-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.social-link-title {
    font-size: 16px;
    font-weight: 600;
    color: #050505;
    line-height: 1.3;
}

.social-link-description {
    font-size: 14px;
    color: var(--sf-gray-500);
    line-height: 1.3;
    margin-top: 4px;
}

/* Facebook */
.facebook-card {
    border-radius: var(--sf-radius-sm);
    border: 1px solid #dddfe2;
}

.facebook-footer {
    background: #f0f2f5;
    padding: 12px 16px;
}

.facebook-card .social-link-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.facebook-card .social-link-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Twitter */
.twitter-card {
    border-radius: 16px;
    border: 1px solid #eff3f4;
}

.twitter-card .social-post-text {
    padding-bottom: 12px;
}

.twitter-footer {
    background: var(--sf-white);
    border-top: 1px solid #eff3f4;
    padding: 12px 16px;
}

.twitter-card .social-link-title {
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.twitter-card .social-link-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.twitter-card .social-link-domain {
    margin-top: 4px;
    margin-bottom: 0;
    text-transform: none;
}

/* Social avatar gradient */
.social-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

/* ========================================
   GUTENBERG SIDEBAR — COMPACT
======================================== */

.seo-fury-sidebar {
    padding: 8px 16px 16px;
}

.seo-fury-metabox-in-sidebar #seo_fury_post_meta {
    margin: 0;
}

.seo-fury-metabox-in-sidebar #seo_fury_post_meta .inside {
    padding: 0 8px 8px;
}

.seo-fury-metabox-in-sidebar #seo_fury_post_meta .postbox-header {
    display: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-wrapper {
    border: none;
    box-shadow: none;
    background: transparent;
}

.seo-fury-metabox-in-sidebar .seo-fury-tabs {
    position: static;
    background: var(--sf-white);
    border-bottom: 1px solid var(--sf-gray-200);
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 0;
    justify-content: space-between;
    padding: 6px 4px;
    margin: 0 -8px 8px;
    border-radius: var(--sf-radius-xs);
}

.seo-fury-metabox-in-sidebar .seo-fury-tab {
    padding: 8px 6px;
    font-size: 12px;
    gap: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 1 1 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab:not(.active) {
    color: var(--sf-gray-500);
    border-bottom-color: transparent;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab:not(.active) .dashicons {
    color: var(--sf-gray-400);
}

.seo-fury-metabox-in-sidebar .seo-fury-tab:not(.active) > :not(.dashicons) {
    display: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab.active {
    color: var(--sf-primary);
    background: var(--sf-primary-light);
    border-bottom: none;
    border-left-color: transparent;
    border-right-color: transparent;
    border-radius: var(--sf-radius-xs);
    font-weight: 600;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab.active > :not(.dashicons) {
    display: inline;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab-label {
    display: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab.active .seo-fury-tab-label {
    display: inline;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab-panels {
    min-height: auto;
}

.seo-fury-metabox-in-sidebar .seo-fury-tab-content {
    padding: 6px 0 10px;
}

.seo-fury-metabox-in-sidebar .seo-fury-section {
    padding: 0 4px;
    margin-bottom: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    color: var(--sf-gray-500);
    border-bottom: none;
}

.seo-fury-metabox-in-sidebar .google-preview,
.seo-fury-metabox-in-sidebar .og-preview,
.seo-fury-metabox-in-sidebar .facebook-preview,
.seo-fury-metabox-in-sidebar .twitter-preview {
    max-width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
}

.seo-fury-metabox-in-sidebar .seo-fury-fields-grid {
    grid-template-columns: 1fr;
}

.seo-fury-metabox-in-sidebar .seo-fury-field input[type="text"],
.seo-fury-metabox-in-sidebar .seo-fury-field input[type="url"],
.seo-fury-metabox-in-sidebar .seo-fury-field input[type="number"],
.seo-fury-metabox-in-sidebar .seo-fury-field textarea,
.seo-fury-metabox-in-sidebar .seo-fury-field select {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: var(--sf-radius-xs);
}

.seo-fury-metabox-in-sidebar .seo-fury-field label {
    font-size: 12px;
}

.seo-fury-metabox-in-sidebar .google-preview .preview-title {
    font-size: 16px;
}

.seo-fury-metabox-in-sidebar .google-preview {
    background: transparent;
    border-color: transparent;
}

.seo-fury-metabox-in-sidebar .button,
.seo-fury-metabox-in-sidebar .button-primary {
    border-radius: var(--sf-radius-xs);
    font-size: 12px;
    padding: 4px 10px;
    min-height: 28px;
}

.seo-fury-metabox-in-sidebar .seo-fury-edit-snippet {
    width: 100%;
    justify-content: center;
}

.seo-fury-metabox-in-sidebar .char-counter {
    font-size: 10px;
}

.seo-fury-metabox-in-sidebar .preview-url {
    font-size: 11px;
    color: var(--sf-gray-500);
}

.seo-fury-metabox-in-sidebar .preview-description {
    font-size: 12px;
    color: var(--sf-gray-500);
}

.seo-fury-metabox-in-sidebar .seo-fury-section .description {
    font-size: 11px;
    color: var(--sf-gray-500);
}

.seo-fury-metabox-in-sidebar .seo-fury-section + .seo-fury-section {
    margin-top: 10px;
}

.seo-fury-metabox-in-sidebar .seo-fury-schema-card {
    flex-wrap: nowrap;
    border: none;
    background: transparent;
    padding: 8px 6px;
}

.seo-fury-metabox-in-sidebar .seo-fury-schema-label {
    flex: 1;
}

.seo-fury-metabox-in-sidebar .seo-fury-schema-actions {
    margin-left: auto;
    padding-left: 0;
}


.seo-fury-metabox-in-sidebar .seo-fury-tabs::-webkit-scrollbar {
    height: 4px;
}

.seo-fury-metabox-in-sidebar .seo-fury-tabs::-webkit-scrollbar-track {
    background: var(--sf-gray-100);
}

.seo-fury-metabox-in-sidebar .seo-fury-tabs::-webkit-scrollbar-thumb {
    background: var(--sf-gray-300);
    border-radius: 999px;
}

.seo-fury-sidebar .google-preview {
    margin-bottom: 12px;
}

.seo-fury-sidebar .preview-title {
    font-size: 16px;
}

.seo-fury-sidebar .preview-description {
    font-size: 13px;
}

/* ========================================
   MODAL ISOLATION — prevent sidebar compact
   styles from leaking into modals
======================================== */

.seo-fury-metabox-in-sidebar .seo-fury-modal .google-preview,
.seo-fury-metabox-in-sidebar .seo-fury-modal .og-preview,
.seo-fury-metabox-in-sidebar .seo-fury-modal .facebook-preview,
.seo-fury-metabox-in-sidebar .seo-fury-modal .twitter-preview {
    max-width: 100%;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    box-shadow: var(--sf-shadow-sm);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .google-preview {
    background: var(--sf-white);
    border-color: var(--sf-gray-200);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .google-preview .preview-title {
    font-size: 16px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field input[type="text"],
.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field input[type="url"],
.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field input[type="number"],
.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field textarea,
.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field select {
    font-size: 13px;
    padding: 6px 10px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-field label {
    font-size: 12px;
    margin-bottom: 4px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .button,
.seo-fury-metabox-in-sidebar .seo-fury-modal .button-primary {
    border-radius: var(--sf-radius-xs);
    font-size: 13px;
    padding: 6px 16px;
    min-height: 36px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-modal-save {
    font-size: 14px;
    padding: 8px 24px;
    min-height: 40px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .char-counter {
    font-size: 11px;
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .preview-url {
    font-size: 12px;
    color: var(--sf-gray-600);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .preview-description {
    font-size: 13px;
    color: var(--sf-gray-600);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-section {
    padding: 14px;
    margin-bottom: 16px;
    background: var(--sf-white);
    border: 1px solid var(--sf-gray-200);
    border-radius: var(--sf-radius-xs);
    box-shadow: var(--sf-shadow-sm);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .seo-fury-section h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: var(--sf-gray-700);
}

.seo-fury-metabox-in-sidebar .seo-fury-modal .shortcode-dropdown-btn {
    height: 34px;
}

/* ========================================
   PANEL SIZE (Classic Editor)
======================================== */

.postbox-container .seo-fury-wrapper {
    max-width: 100%;
}

#seo_fury_post_meta {
    width: 100%;
}

#seo_fury_post_meta .inside {
    padding: 0;
    margin: 0;
}

/* ========================================
   AI GENERATE BUTTONS
======================================== */

.sf-ai-gen-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: 1px solid #6366F1;
    border-radius: var(--sf-radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sf-transition);
}

.sf-ai-gen-btn:hover {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-color: #4F46E5;
    transform: scale(1.05);
}

.sf-ai-gen-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sf-ai-gen-btn .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sf-ai-gen-btn .dashicons.sf-ai-spin {
    animation: sf-ai-spin 1s linear infinite;
}

@keyframes sf-ai-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.seo-fury-modal-body .sf-ai-gen-btn {
    height: 36px;
    align-self: flex-start;
}

.input-with-dropdown:has(textarea) .sf-ai-gen-btn {
    margin-top: 0;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1200px) {
    .seo-fury-fields-grid {
        grid-template-columns: 1fr;
    }

    .seo-fury-modal-grid {
        grid-template-columns: 1fr;
    }

    .seo-fury-shortcodes-help ul.variables-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .seo-fury-modal-grid-right .seo-fury-field:nth-of-type(2) {
        margin-top: 10px;
    }

    .seo-fury-modal-social-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .seo-fury-tabs {
        flex-wrap: wrap;
    }

    .seo-fury-tab {
        flex: 1 1 50%;
        font-size: 13px;
        padding: 12px 10px;
    }

    .seo-fury-tab-content {
        padding: 15px;
    }

    .seo-fury-section {
        padding: 15px;
    }

    .seo-fury-fields-grid {
        grid-template-columns: 1fr;
    }

    .seo-fury-modal-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .seo-fury-modal-grid {
        grid-template-columns: 1fr;
    }

    .seo-fury-modal-social-grid {
        grid-template-columns: 1fr;
    }

    .seo-fury-modal-body {
        padding: 16px;
    }

    .seo-fury-modal-header {
        padding: 14px 16px;
    }

    .seo-fury-modal-footer {
        padding: 14px 16px;
    }

    .seo-fury-shortcodes-help ul.variables-grid {
        grid-template-columns: 1fr;
    }

    .social-preview-row,
    .social-settings-row {
        grid-template-columns: 1fr;
    }
}

/* Schema Editor Modal */
#seo-fury-schema-editor-modal {
    z-index: 10000010;
}

#seo-fury-schema-editor-modal .seo-fury-modal-overlay {
    z-index: 10000010;
}

#seo-fury-schema-editor-modal .seo-fury-modal-content {
    max-width: 1000px;
    z-index: 10000011;
}

#seo-fury-schema-editor-modal .seo-fury-modal-panels .seo-fury-modal-panel {
    display: none;
}

#seo-fury-schema-editor-modal .seo-fury-modal-panels .seo-fury-modal-panel.active {
    display: block;
}

#schema-editor-fields-container .seo-fury-section {
    margin-bottom: 16px;
}

#schema-editor-fields-container .seo-fury-section:last-child {
    margin-bottom: 0;
}

#schema-editor-preview-output {
    background: var(--sf-dark, #1a202c);
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--sf-radius-sm, 8px);
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    min-height: 300px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#schema-editor-custom-json {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--sf-radius-sm, 8px);
    font-size: 13px;
}

/* ========================================
   Secondary Keywords Tag Input
======================================== */
.seo-fury-keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--sf-gray-300, #CBD5E1);
    border-radius: var(--sf-radius-sm, 8px);
    background: #fff;
    min-height: 38px;
    align-items: center;
    cursor: text;
    transition: border-color 0.15s;
}
.seo-fury-keywords-tags:focus-within {
    border-color: var(--sf-primary, #4F46E5);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}
.seo-fury-keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--sf-primary-light, #EEF2FF);
    color: var(--sf-primary, #4F46E5);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}
.seo-fury-keyword-remove {
    background: none;
    border: none;
    color: var(--sf-primary, #4F46E5);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.seo-fury-keyword-remove:hover {
    opacity: 1;
    color: var(--sf-danger, #EF4444);
}
.seo-fury-keyword-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    font-size: 13px !important;
    flex: 1;
    min-width: 120px;
    background: transparent !important;
}
