/*
 * STWT Wizard Metabox Styles
 * Handles wizard step navigation, layout, and all wizard-specific UI within the CPT editor
 */

/* ====================================
   WIZARD STEPS NAVIGATION BAR
   ==================================== */
.stwt-metabox-wizard .stwt-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.stwt-metabox-wizard .stwt-step {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
}

.stwt-metabox-wizard .stwt-step:hover {
    background: rgba(16, 185, 129, 0.08);
}

.stwt-metabox-wizard .stwt-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
    flex-shrink: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stwt-metabox-wizard .stwt-step .step-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    transition: all 0.25s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stwt-metabox-wizard .stwt-step.active .step-num {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.stwt-metabox-wizard .stwt-step.active .step-label {
    color: #059669;
    font-weight: 600;
}

.stwt-metabox-wizard .stwt-step.completed .step-num {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.stwt-metabox-wizard .stwt-step.completed .step-label {
    color: #334155;
}

.stwt-metabox-wizard .stwt-step-arrow {
    display: inline-flex;
    align-items: center;
    color: #cbd5e1;
    font-size: 16px;
    margin: 0 2px;
}

.stwt-metabox-wizard .stwt-step-arrow .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* ====================================
   WIZARD HEADER TOOLBAR
   ==================================== */
.stwt-metabox-wizard .stwt-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.stwt-metabox-wizard .stwt-wizard-header .header-left h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stwt-metabox-wizard .stwt-wizard-header .help-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stwt-metabox-wizard .stwt-wizard-header .help-badge:hover {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    transform: translateY(-1px);
}

.stwt-metabox-wizard .stwt-wizard-header .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Shortcode copy container */
.stwt-metabox-wizard .shortcode-copy-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #475569;
}

.stwt-metabox-wizard .shortcode-copy-container .copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.stwt-metabox-wizard .shortcode-copy-container .copy-btn:hover {
    color: #10b981;
}

/* Wizard Buttons */
.stwt-metabox-wizard .stwt-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    white-space: nowrap;
}

.stwt-metabox-wizard .stwt-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.stwt-metabox-wizard .stwt-btn.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.stwt-metabox-wizard .stwt-btn.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.stwt-metabox-wizard .stwt-btn.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.stwt-metabox-wizard .stwt-btn.btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ====================================
   WIZARD STEP CONTENT PANELS
   ==================================== */
.stwt-metabox-wizard .stwt-wizard-step-content {
    display: none;
    animation: fadeInStep 0.3s ease;
}

.stwt-metabox-wizard .stwt-wizard-step-content.active {
    display: block;
}

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

.stwt-metabox-wizard .stwt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
}

/* ====================================
   STEP 1: DATA SOURCE
   ==================================== */
.stwt-metabox-wizard .stwt-table.universal-setting {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.stwt-metabox-wizard .stwt-table.universal-setting tr td {
    padding: 10px 12px;
    vertical-align: top;
}

.stwt-metabox-wizard .stwt-form-control {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stwt-metabox-wizard .stwt-form-control .form-label {
    min-width: 170px;
    flex-shrink: 0;
}

.stwt-metabox-wizard .stwt-form-control .form-label label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 40px;
}

.stwt-metabox-wizard .stwt-form-control .form-field {
    flex: 1;
}

.stwt-metabox-wizard .stwt-form-control .form-field input[type="text"],
.stwt-metabox-wizard .stwt-form-control .form-field input[type="number"] {
    width: 100%;
    max-width: 500px;
    padding: 8px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    height: 40px;
    box-shadow: none;
}

.stwt-metabox-wizard .stwt-form-control .form-field input[type="text"]:focus,
.stwt-metabox-wizard .stwt-form-control .form-field input[type="number"]:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.stwt-metabox-wizard .stwt-form-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* ====================================
   STEP 2: TABLE THEME SECTION
   ==================================== */
.stwt-metabox-wizard .stwt-theme-section h3,
.stwt-metabox-wizard .stwt-customize-options-section h3,
.stwt-metabox-wizard .stwt-pagination-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stwt-metabox-wizard .stwt-theme-section h3 .help-icon,
.stwt-metabox-wizard .stwt-customize-options-section h3 .help-icon {
    color: #94a3b8;
    cursor: help;
}

/* Theme grid */
.stwt-metabox-wizard .stwt-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stwt-metabox-wizard .theme-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    position: relative;
}

.stwt-metabox-wizard .theme-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.stwt-metabox-wizard .theme-card.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 4px 12px rgba(16, 185, 129, 0.12);
}

.stwt-metabox-wizard .theme-card-inner {
    padding: 0;
}

.stwt-metabox-wizard .card-radio {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
}

.stwt-metabox-wizard .card-radio .radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.stwt-metabox-wizard .theme-card.selected .card-radio {
    border-color: #10b981;
}

.stwt-metabox-wizard .theme-card.selected .card-radio .radio-dot {
    background: #10b981;
}

.stwt-metabox-wizard .theme-card-preview {
    padding: 10px;
    min-height: 100px;
}

.stwt-metabox-wizard .theme-card-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    line-height: 1.3;
}

.stwt-metabox-wizard .theme-card-preview table th,
.stwt-metabox-wizard .theme-card-preview table td {
    padding: 4px 6px;
    text-align: left;
}

.stwt-metabox-wizard .theme-card .theme-name {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Theme preview styles */
.theme-preview-simple table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #333;
    font-weight: 700;
}
.theme-preview-simple table td {
    border-bottom: 1px solid #eee;
    color: #555;
}

.theme-preview-simple-dark {
    background: #1a1a2e !important;
}
.theme-preview-simple-dark table th {
    background: #16213e;
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
}
.theme-preview-simple-dark table td {
    color: #94a3b8;
    border-bottom: 1px solid #1e293b;
}

.theme-preview-minimal table th {
    background: transparent;
    border-bottom: 2px solid #1e293b;
    color: #1e293b;
    font-weight: 700;
}
.theme-preview-minimal table td {
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
}

.theme-preview-minimal-dark {
    background: #0f172a !important;
}
.theme-preview-minimal-dark table th {
    background: transparent;
    border-bottom: 2px solid #475569;
    color: #e2e8f0;
}
.theme-preview-minimal-dark table td {
    color: #94a3b8;
    border-bottom: 1px solid #1e293b;
}

.theme-preview-minimal-elegant table th {
    background: transparent;
    border-bottom: 2px solid #6366f1;
    color: #4338ca;
    font-weight: 700;
    text-transform: capitalize;
}
.theme-preview-minimal-elegant table td {
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.theme-preview-uppercase-heading table th {
    background: #f8fafc;
    border-bottom: 2px solid #10b981;
    color: #1e293b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 8px;
}
.theme-preview-uppercase-heading table td {
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.theme-preview-uppercase-elegant table th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 2px solid #7c3aed;
    color: #5b21b6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 8px;
}
.theme-preview-uppercase-elegant table td {
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.theme-preview-vertical-style table th {
    background: #1e293b;
    color: #f8fafc;
    border-bottom: 1px solid #334155;
}
.theme-preview-vertical-style table td {
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    border-left: 3px solid #e2e8f0;
}
.theme-preview-vertical-style table td:first-child {
    border-left: 3px solid #10b981;
}

.theme-preview-dark-knight {
    background: #0a0a0a !important;
}
.theme-preview-dark-knight table th {
    background: #111;
    color: #f59e0b;
    border-bottom: 1px solid #333;
    font-weight: 700;
}
.theme-preview-dark-knight table td {
    color: #a1a1aa;
    border-bottom: 1px solid #1a1a1a;
}

/* New Theme Card */
.stwt-metabox-wizard .theme-card-new-theme .theme-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.stwt-metabox-wizard .new-theme-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 20px;
}

.stwt-metabox-wizard .new-theme-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #94a3b8;
}

.stwt-metabox-wizard .new-theme-text {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Custom theme actions */
.stwt-metabox-wizard .theme-custom-name-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.stwt-metabox-wizard .theme-custom-actions {
    display: flex;
    gap: 6px;
}

.stwt-metabox-wizard .theme-custom-actions button {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: all 0.2s;
    color: #64748b;
}

.stwt-metabox-wizard .edit-custom-theme-btn:hover {
    background: #e0f2fe;
    color: #0284c7;
}

.stwt-metabox-wizard .delete-custom-theme-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.stwt-metabox-wizard .theme-custom-actions button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ====================================
   CUSTOMIZE THEME OPTIONS
   ==================================== */
.stwt-metabox-wizard .stwt-customize-options-section {
    margin-top: 35px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.stwt-metabox-wizard .stwt-customize-options-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stwt-metabox-wizard .stwt-custom-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stwt-metabox-wizard .stwt-custom-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stwt-metabox-wizard .stwt-custom-options-grid {
        grid-template-columns: 1fr;
    }
}

.stwt-metabox-wizard .option-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stwt-metabox-wizard .option-column h4 {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stwt-metabox-wizard .color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.stwt-metabox-wizard .circle-picker-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.stwt-metabox-wizard .circle-picker-wrapper:hover {
    border-color: #22c55e;
    transform: scale(1.05);
}

.stwt-metabox-wizard .circle-color-input {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: none;
    -webkit-appearance: none;
    appearance: none;
}

.stwt-metabox-wizard .circle-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.stwt-metabox-wizard .circle-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.stwt-metabox-wizard .circle-color-input::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.stwt-metabox-wizard .color-picker-label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

/* Pagination section */
.stwt-metabox-wizard .stwt-pagination-section {
    margin-top: 30px;
    padding-top: 0;
    border-top: none;
}

.stwt-metabox-wizard .stwt-pagination-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.stwt-metabox-wizard .pagination-options-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ====================================
   STEP 3: TABLE CUSTOMIZATION
   ==================================== */
.stwt-metabox-wizard .stwt-customization-layout {
    display: flex;
    gap: 0;
    min-height: 400px;
}

.stwt-metabox-wizard .customization-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    border-radius: 14px 0 0 14px;
    padding: 12px 0;
    margin: -24px 0 -24px -24px;
}

.stwt-metabox-wizard .sidebar-tab-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border-left: 3px solid transparent;
}

.stwt-metabox-wizard .sidebar-tab-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.stwt-metabox-wizard .sidebar-tab-btn.active {
    background: #fff;
    color: #059669;
    font-weight: 600;
    border-left-color: #10b981;
}

.stwt-metabox-wizard .customization-content {
    flex: 1;
    min-width: 0;
}

/* Layout subtab */
.stwt-metabox-wizard .subtab-panel {
    padding: 0px 25px 25px 25px;
    color: #475569;
}

.stwt-metabox-wizard .custom-panel-row {
    display: flex;
    gap: 30px;
    margin-bottom: 16px;
}

.stwt-metabox-wizard .panel-column {
    flex: 1;
    min-width: 200px;
}

.stwt-metabox-wizard .panel-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stwt-metabox-wizard .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

/* Checkbox styles */
.stwt-metabox-wizard .stwt-checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none;
}

.stwt-metabox-wizard .stwt-checkbox-container input[type="checkbox"] {
    display: none;
}

.stwt-metabox-wizard .stwt-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #fff;
}

.stwt-metabox-wizard .stwt-checkmark::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.stwt-metabox-wizard .stwt-checkbox-container input[type="checkbox"]:checked ~ .stwt-checkmark {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}

.stwt-metabox-wizard .stwt-checkbox-container input[type="checkbox"]:checked ~ .stwt-checkmark::after {
    transform: rotate(45deg) scale(1);
}

/* Swap button */
.stwt-metabox-wizard .swap-pos-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stwt-metabox-wizard .checkbox-group .swap-pos-btn {
    align-self: flex-start;
    margin-top: 0;
}

.stwt-metabox-wizard .swap-pos-btn:hover,
.stwt-metabox-wizard .swap-pos-btn.active {
    background: #ecfdf5;
    border-color: #10b981;
    color: #059669;
}

.stwt-metabox-wizard .swap-pos-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Panel divider */
.stwt-metabox-wizard .panel-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 20px 0;
}

/* General checkbox list */
.stwt-metabox-wizard .general-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.stwt-metabox-wizard .inline-flex-container {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stwt-metabox-wizard .stwt-select-inline {
    padding: 4px 8px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    cursor: pointer;
}

/* Sorting settings */
.stwt-metabox-wizard .sorting-settings-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.stwt-metabox-wizard .sorting-settings-box h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.stwt-metabox-wizard .sorting-fields-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.stwt-metabox-wizard .field-item {
    flex: 1;
    min-width: 160px;
}

.stwt-metabox-wizard .field-item label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.stwt-metabox-wizard .stwt-select-field {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    height: 40px;
}

.stwt-metabox-wizard .stwt-select-field:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Freeze settings */
.stwt-metabox-wizard .freeze-settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ====================================
   UTILITY PANEL (subtab-utility)
   ==================================== */
.stwt-metabox-wizard .utility-section {
    margin-bottom: 24px;
}

.stwt-metabox-wizard .utility-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stwt-metabox-wizard .utility-title-row h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Tooltip */
.stwt-metabox-wizard .stwt-tooltip {
    position: relative;
    cursor: help;
}

.stwt-metabox-wizard .stwt-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.stwt-metabox-wizard .stwt-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Export buttons */
.stwt-metabox-wizard .export-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stwt-metabox-wizard .export-btn-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #fff;
}

.stwt-metabox-wizard .export-btn-label:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.stwt-metabox-wizard .export-btn-label input[type="checkbox"]:checked + span {
    color: #059669;
}

.stwt-metabox-wizard .export-btn-label:has(input:checked) {
    border-color: #10b981;
    background: #ecfdf5;
}

/* Toggle cards */
.stwt-metabox-wizard .toggle-cards-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stwt-metabox-wizard .toggle-card-label {
    cursor: pointer;
}

.stwt-metabox-wizard .toggle-card-label input[type="radio"] {
    display: none;
}

.stwt-metabox-wizard .toggle-card-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #fff;
}

.stwt-metabox-wizard .toggle-card-content:hover {
    border-color: #94a3b8;
}

.stwt-metabox-wizard .toggle-card-label input[type="radio"]:checked + .toggle-card-content {
    border-color: #10b981;
    background: #ecfdf5;
    color: #059669;
}

.stwt-metabox-wizard .card-radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.stwt-metabox-wizard .card-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s;
}

.stwt-metabox-wizard .toggle-card-label input[type="radio"]:checked + .toggle-card-content .card-radio-dot {
    border-color: #10b981;
}

.stwt-metabox-wizard .toggle-card-label input[type="radio"]:checked + .toggle-card-content .card-radio-dot::after {
    background: #10b981;
}

/* Utility checkboxes list */
.stwt-metabox-wizard .utility-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

/* Toggle switch */
.stwt-metabox-wizard .stwt-switch-container {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.stwt-metabox-wizard .stwt-switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.stwt-metabox-wizard .stwt-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.stwt-metabox-wizard .stwt-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.stwt-metabox-wizard .stwt-switch-container input:checked + .stwt-slider {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stwt-metabox-wizard .stwt-switch-container input:checked + .stwt-slider:before {
    transform: translateX(18px);
}

/* ====================================
   CUSTOM THEME MODAL
   ==================================== */
.stwt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s ease;
}

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

.stwt-modal-container {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 780px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.stwt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.stwt-modal-header .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.stwt-modal-header .back-link:hover {
    color: #059669;
}

.stwt-modal-header .close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.stwt-modal-header .close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.stwt-modal-body {
    padding: 24px;
}

.stwt-modal-body .modal-form-group {
    margin-bottom: 20px;
}

.stwt-modal-body .modal-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.stwt-modal-body .theme-name-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.stwt-modal-body .theme-name-input:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.stwt-modal-body .modal-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stwt-modal-colors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stwt-modal-colors-grid .modal-color-card {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 16px;
}

.stwt-modal-colors-grid .modal-color-card h5 {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 12px 0;
}

.modal-color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.modal-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.toggle-label-modal {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.stwt-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
}

/* ====================================
   RESPONSIVE TWEAKS
   ==================================== */
@media (max-width: 1200px) {
    .stwt-metabox-wizard .stwt-wizard-steps {
        gap: 4px;
        padding: 14px 16px;
    }
    .stwt-metabox-wizard .stwt-step {
        padding: 6px 10px;
    }
    .stwt-metabox-wizard .stwt-step .step-label {
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .stwt-metabox-wizard .stwt-wizard-steps {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
    }
    .stwt-metabox-wizard .stwt-step-arrow {
        display: none;
    }
    .stwt-metabox-wizard .stwt-wizard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stwt-metabox-wizard .stwt-customization-layout {
        flex-direction: column;
    }
    .stwt-metabox-wizard .customization-sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        margin: -24px -24px 0 -24px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 14px 14px 0 0;
        padding: 8px;
        gap: 4px;
    }
    .stwt-metabox-wizard .sidebar-tab-btn {
        width: auto;
        padding: 8px 14px;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 6px;
    }
    .stwt-metabox-wizard .sidebar-tab-btn.active {
        border-left-color: transparent;
        border-bottom-color: #10b981;
    }
    .stwt-modal-colors-grid {
        grid-template-columns: 1fr;
    }
}

/* Make CPT post editor layout 100% width since we removed sidebar metaboxes */
.post-type-stwt_shortcode_post #poststuff #post-body.has-sidebar {
    margin-right: 0 !important;
}

.post-type-stwt_shortcode_post #poststuff #post-body-content {
    float: none !important;
    width: 100% !important;
}

.post-type-stwt_shortcode_post #postbox-container-1 {
    display: none !important;
}


  /* Force WordPress post editor layout to 100% full width */
#poststuff #post-body {
    margin-right: 0 !important;
}
#poststuff #post-body-content {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
}
#poststuff #postbox-container-1 {
    display: none !important;
}
#poststuff #postbox-container-2 {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
}
.columns-2 #post-body-content {
    margin-right: 0 !important;
}
#poststuff.columns-2 #post-body-content {
    margin-right: 0 !important;
}


