/* Admin Styles for Sekhlo Schema Code */

.sekhlo-schema-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Header & Tabs */
.sekhlo-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sekhlo-tabs {
    display: flex;
    margin: 0;
    gap: 4px;
    padding: 8px 12px;
}

.sekhlo-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-weight: 500;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.sekhlo-tab:hover {
    color: #111827;
    background: #f3f4f6;
}

.sekhlo-tab.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sekhlo-tab.active:hover {
    color: #1d4ed8;
}

.sekhlo-tab-link {
    text-decoration: none;
    margin-left: auto;
    /* Push to right if needed, or keep inline */
    color: #d63638;
    /* Red highlight as shown in user request */
    font-weight: 600;
}

.sekhlo-tab-link:hover {
    background: #f0f0f1;
    color: #d63638;
}

/* AEO Score tab — blue accent */
.sekhlo-tab.sekhlo-tab-aeo {
    color: #2563eb;
    font-weight: 600;
}
.sekhlo-tab.sekhlo-tab-aeo:hover {
    background: #eff6ff;
}
.sekhlo-tab.sekhlo-tab-aeo.active {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37,99,235,.15);
}

/* Entity tab — violet accent */
.sekhlo-tab.sekhlo-tab-entity {
    color: #7c3aed;
    font-weight: 600;
}
.sekhlo-tab.sekhlo-tab-entity:hover {
    background: #faf5ff;
}
.sekhlo-tab.sekhlo-tab-entity.active {
    background: #faf5ff;
    color: #6d28d9;
    box-shadow: 0 1px 3px rgba(124,58,237,.15);
}

/* Woo Schema tab — purple/pink accent */
.sekhlo-tab.sekhlo-tab-woo {
    color: #7c3aed;
    font-weight: 600;
}
.sekhlo-tab.sekhlo-tab-woo:hover {
    background: #faf5ff;
}
.sekhlo-tab.sekhlo-tab-woo.active {
    background: #faf5ff;
    color: #6d28d9;
    box-shadow: 0 1px 3px rgba(124,58,237,.15);
}

/* Content Detector tab — blue accent */
.sekhlo-tab.sekhlo-tab-detector {
    color: #2563eb;
    font-weight: 600;
}
.sekhlo-tab.sekhlo-tab-detector:hover {
    background: #eff6ff;
}
.sekhlo-tab.sekhlo-tab-detector.active {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37,99,235,.15);
}

/* Conflict Scanner tab — red accent */
.sekhlo-tab.sekhlo-tab-conflict {
    color: #dc2626;
    font-weight: 600;
}
.sekhlo-tab.sekhlo-tab-conflict:hover {
    background: #fef2f2;
}
.sekhlo-tab.sekhlo-tab-conflict.active {
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 1px 3px rgba(220,38,38,.15);
}

/* Spin animation for loading icons */
@keyframes sekhlo-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.sekhlo-spin {
    animation: sekhlo-spin 1s linear infinite;
    display: inline-block;
}

/* Content Area */
.sekhlo-content {
    padding: 24px;
    min-height: 300px;
    background: #ffffff;
}

.sekhlo-tab-content {
    display: none;
}

.sekhlo-tab-content.active {
    display: block;
}

/* Wrapper Reset */
.sekhlo-schema-wrapper * {
    box-sizing: border-box;
}

/* Field Card Component */
.sekhlo-field-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    display: block;
    clear: both;
}

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

.sekhlo-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.sekhlo-field-hint {
    font-size: 12px;
    color: #757575;
}

.sekhlo-field-actions {
    display: flex;
    gap: 8px;
}

.sekhlo-btn-secondary {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #2271b1;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.sekhlo-btn-secondary:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.sekhlo-btn-primary {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.sekhlo-btn-primary:hover {
    background: #2271b1;
}

.sekhlo-btn-purple {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sekhlo-btn-purple:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.sekhlo-btn-purple:active {
    background: #1e40af !important;
    color: #ffffff !important;
    transform: translateY(0);
}

.sekhlo-btn-purple .dashicons {
    color: #ffffff !important;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sekhlo-field-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    min-height: 40px;
}

textarea.sekhlo-field-input {
    min-height: 80px;
    resize: vertical;
}

.sekhlo-field-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.sekhlo-field-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 15px;
}

.sekhlo-char-count {
    font-size: 12px;
    color: #757575;
    white-space: nowrap;
}

.sekhlo-keyphrase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 20px;
}

.sekhlo-keyphrase-input-row {
    display: flex;
    gap: 10px;
}

.sekhlo-keyphrase-input-row .sekhlo-field-input {
    flex: 1;
}

.sekhlo-field-row {
    margin-bottom: 15px;
}

.sekhlo-field-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Collapsible Section */
.sekhlo-collapsible .sekhlo-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0;
    margin: -20px -20px 0 -20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e4e7;
    border-radius: 8px 8px 0 0;
}

.sekhlo-collapsible .sekhlo-collapsible-header:hover {
    background: #f0f0f1;
}

.sekhlo-collapse-icon {
    font-size: 12px;
    color: #757575;
    transition: transform 0.2s;
}

.sekhlo-collapsible.open .sekhlo-collapse-icon {
    transform: rotate(180deg);
}

.sekhlo-collapsible-body {
    display: none;
    padding-top: 20px;
}

.sekhlo-collapsible.open .sekhlo-collapsible-body {
    display: block;
}

/* Advanced Field Styles */
.sekhlo-advanced-field {
    margin-bottom: 20px;
}

.sekhlo-advanced-field:last-child {
    margin-bottom: 0;
}

.sekhlo-advanced-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
    margin-bottom: 8px;
}

.sekhlo-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.sekhlo-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

.sekhlo-tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sekhlo-checkbox-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.sekhlo-checkbox-tag:hover {
    border-color: #2271b1;
}

.sekhlo-checkbox-tag.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.sekhlo-checkbox-tag input {
    display: none;
}

/* Schema Manager (List) */
.sekhlo-schema-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sekhlo-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

.sekhlo-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #d1d5db;
}

.sekhlo-empty-state p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.sekhlo-schema-item {
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

/* Add New Schema Box */
.sekhlo-add-schema-box {
    background: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin-top: 24px;
    overflow: hidden;
    transition: all 0.2s;
}

.sekhlo-add-schema-box:hover {
    border-color: #2563eb;
    background: #f9fafb;
}

.sekhlo-add-box-header {
    background: #f3f4f6;
    padding: 14px 20px;
    color: #111827;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.sekhlo-add-box-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #2563eb;
}

.sekhlo-add-box-body {
    padding: 20px;
}

.sekhlo-form-row {
    margin-bottom: 18px;
}

.sekhlo-form-row:last-child {
    margin-bottom: 0;
}

.sekhlo-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.sekhlo-add-box-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.sekhlo-divider-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.sekhlo-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.sekhlo-link-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #2563eb;
}

.sekhlo-link-btn:active {
    background: #dbeafe;
    color: #1e40af;
}

.sekhlo-link-btn .dashicons {
    color: currentColor;
}

/* Schema Card - New Design */
.sekhlo-schema-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.sekhlo-schema-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sekhlo-schema-card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #f9fafb;
    border-bottom: 1px solid transparent;
    transition: all 0.15s;
}

.sekhlo-schema-card-header:hover {
    background: #f3f4f6;
}

.sekhlo-schema-card.open .sekhlo-schema-card-header {
    border-bottom-color: #e5e7eb;
    background: #ffffff;
}

.sekhlo-schema-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sekhlo-schema-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sekhlo-schema-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.sekhlo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.sekhlo-status-dot.status-enabled {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.sekhlo-status-dot.status-disabled {
    background: #9ca3af;
}

.sekhlo-schema-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sekhlo-icon-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 6px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sekhlo-icon-btn:hover {
    color: #dc2626;
    background: #fee2e2;
    border-color: #fca5a5;
}

.sekhlo-icon-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sekhlo-expand-icon {
    color: #9ca3af;
    transition: transform 0.2s;
}

.sekhlo-schema-card.open .sekhlo-expand-icon {
    transform: rotate(180deg);
    color: #6b7280;
}

.sekhlo-schema-card-body {
    display: none;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
}

.sekhlo-schema-card.open .sekhlo-schema-card-body {
    display: block;
}

.sekhlo-form-group {
    margin-bottom: 16px;
}

.sekhlo-form-group:last-child {
    margin-bottom: 0;
}

.sekhlo-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.sekhlo-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: #ffffff;
    color: #111827;
}

.sekhlo-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sekhlo-code-editor {
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #f9fafb;
    resize: vertical;
    transition: all 0.2s;
    color: #111827;
}

.sekhlo-code-editor:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.validation-msg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    background: #f9fafb;
}

.sekhlo-schema-header {
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.sekhlo-schema-header:hover {
    background: #f0f0f1;
}

.sekhlo-schema-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sekhlo-schema-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #2271b1;
    color: #fff;
}

.sekhlo-schema-actions {
    display: flex;
    gap: 10px;
}

.sekhlo-schema-body {
    padding: 15px;
    display: none;
}

.sekhlo-schema-item.open .sekhlo-schema-body {
    display: block;
}

.sekhlo-editor {
    width: 100%;
    min-height: 200px;
    font-family: monospace;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    line-height: 1.4;
    font-size: 13px;
    background: #fafafa;
    tab-size: 2;
}

/* Template Grid */
.sekhlo-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.sekhlo-template-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #ffffff;
}

.sekhlo-template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2563eb;
}

.sekhlo-template-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    color: #2563eb;
}

.sekhlo-template-name {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 14px;
}

.sekhlo-template-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* Preview Area */
.sekhlo-preview-container {
    padding: 24px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sekhlo-preview-section {
    margin-bottom: 30px;
}

.sekhlo-raw-code-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

/* SERP Simulation */
.google-serp {
    font-family: arial, sans-serif;
    max-width: 600px;
    margin-bottom: 20px;
}

.serp-url {
    font-size: 14px;
    color: #202124;
    margin-bottom: 4px;
}

.serp-title {
    font-size: 20px;
    color: #1a0dab;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
    font-weight: 400;
}

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

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

/* Buttons */
.sekhlo-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s;
}

.sekhlo-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.sekhlo-btn:active {
    background: #f3f4f6;
    transform: translateY(0);
}

.sekhlo-btn-primary {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.sekhlo-btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.sekhlo-btn-primary:active {
    background: #1e40af !important;
    border-color: #1e40af !important;
    color: #ffffff !important;
    transform: translateY(0);
}

.sekhlo-btn-primary .dashicons {
    color: #ffffff !important;
}

.sekhlo-btn-danger {
    color: #d63638;
    border-color: #d63638;
    background: transparent;
}

.sekhlo-btn-danger:hover {
    background: #d63638;
    color: #fff;
}

.sekhlo-actions-bar {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

/* Drag Handle */
.sekhlo-drag-handle {
    cursor: move;
    padding: 0 10px;
    color: #ccd0d4;
    font-size: 18px;
}

.sekhlo-schema-item.ui-sortable-placeholder {
    visibility: visible !important;
    background: #f0f0f1;
    border: 2px dashed #ccd0d4;
}

/* Quick Paste Area */
.sekhlo-quick-paste-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sekhlo-quick-paste-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.sekhlo-msg {
    font-size: 13px;
    font-weight: 500;
}

/* Bulk Actions Bar */
.sekhlo-bulk-actions {
    background: #f9fafb;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sekhlo-bulk-actions select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    min-width: 150px;
}

.sekhlo-bulk-actions select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dark Mode */
.sekhlo-dark-mode {
    background: #1d2327;
    color: #f0f0f1;
}

.sekhlo-dark-mode .sekhlo-schema-wrapper {
    background: #2c3338;
    border-color: #444;
}

.sekhlo-dark-mode .sekhlo-header,
.sekhlo-dark-mode .sekhlo-bulk-actions,
.sekhlo-dark-mode .sekhlo-schema-header {
    background: #1d2327;
    border-color: #444;
}

.sekhlo-dark-mode .sekhlo-tab {
    color: #ccd0d4;
}

.sekhlo-dark-mode .sekhlo-tab.active {
    background: #2c3338;
    border-color: #444;
    border-top-color: #2271b1;
    color: #fff;
}

.sekhlo-dark-mode .sekhlo-schema-item {
    background: #1d2327;
    border-color: #444;
}

.sekhlo-dark-mode .sekhlo-editor {
    background: #2c3338;
    color: #fff;
    border-color: #444;
}

/* AI Score Meter */
.sekhlo-score-meter {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.sekhlo-score-fill {
    height: 100%;
    background: #4caf50;
    width: 0%;
    transition: width 0.5s ease;
}

.sekhlo-score-value {
    font-weight: bold;
    font-size: 24px;
    color: #2271b1;
}

/* Toggle Switch */
.sekhlo-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.sekhlo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sekhlo-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 22px;
}

.sekhlo-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked+.sekhlo-slider {
    background-color: #10b981;
}

input:checked+.sekhlo-slider:before {
    transform: translateX(18px);
}

/* Progress Bar */
.sekhlo-progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.sekhlo-progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background 0.3s;
}

.sekhlo-progress-fill.good {
    background: #4caf50;
}

.sekhlo-progress-fill.warning {
    background: #ff9800;
}

.sekhlo-progress-fill.danger {
    background: #f44336;
}

/* AI Button */
.sekhlo-ai-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #2563eb;
    color: #2563eb;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.sekhlo-ai-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Button Group */
.sekhlo-btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Variable Button */
.sekhlo-var-btn {
    background: #f0f0f1;
    border: 1px solid #ccd0d4;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}

/* SEO Field Row */
.sekhlo-seo-row {
    margin-bottom: 25px;
}

.sekhlo-seo-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.sekhlo-seo-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.sekhlo-seo-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* SEO Preview Card */
.sekhlo-seo-preview-card {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.sekhlo-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* ===== Redesigned SEO Tab Styles ===== */

.sekhlo-seo-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}

/* Google Preview Card */
.sekhlo-google-preview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.sekhlo-google-preview-card .sekhlo-card-header {
    background: #f8fafc;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sekhlo-google-preview-card .sekhlo-card-header .dashicons {
    color: #64748b;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.sekhlo-google-preview-card .sekhlo-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sekhlo-serp-preview {
    padding: 24px;
}

/* Field Groups */
.sekhlo-seo-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.sekhlo-field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sekhlo-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sekhlo-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.sekhlo-field-label .dashicons {
    color: #6366f1;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.sekhlo-field-hint {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Inputs */
.sekhlo-input,
.sekhlo-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s;
    line-height: 1.5;
}

.sekhlo-input:focus,
.sekhlo-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sekhlo-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Variable Button */
.sekhlo-var-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.sekhlo-var-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.sekhlo-var-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #6366f1;
}

/* Field Meta & Counters */
.sekhlo-field-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.sekhlo-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.sekhlo-count-value {
    font-weight: 700;
    color: #1e293b;
}

.sekhlo-count-divider {
    color: #cbd5e1;
}

.sekhlo-count-label {
    margin-left: 2px;
}

/* Progress Bars */
.sekhlo-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 300px;
}

.sekhlo-progress-bar {
    height: 6px;
    flex: 1;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.sekhlo-progress-fill {
    height: 100%;
    width: 0%;
    background: #10b981;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.sekhlo-progress-fill.warning {
    background: #f59e0b;
}

.sekhlo-progress-fill.danger {
    background: #ef4444;
}

.sekhlo-status-text {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 70px;
    text-align: right;
}

/* Keyphrases */
.sekhlo-keyphrase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
    min-height: 32px;
}

.sekhlo-keyphrase-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #6366f1;
    color: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.sekhlo-keyphrase-tag .remove-keyphrase {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    line-height: 1;
}

.sekhlo-keyphrase-tag .remove-keyphrase:hover {
    opacity: 1;
}

.sekhlo-keyphrase-input-row {
    display: flex;
    gap: 10px;
}

/* Accordion / Advanced Settings */
.sekhlo-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

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

.sekhlo-accordion-header:hover {
    background: #f1f5f9;
}

.sekhlo-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}

.sekhlo-accordion-title .dashicons {
    color: #64748b;
}

.sekhlo-accordion-subtitle {
    font-weight: 400;
    color: #64748b;
    font-size: 13px;
    margin-left: 5px;
}

.sekhlo-accordion-icon {
    font-size: 20px;
    color: #94a3b8;
    transition: transform 0.3s;
}

.sekhlo-collapsible.open .sekhlo-accordion-icon {
    transform: rotate(180deg);
}

.sekhlo-accordion-body {
    padding: 24px;
    display: none;
    border-top: 1px solid #e2e8f0;
}

.sekhlo-collapsible.open .sekhlo-accordion-body {
    display: block;
}

/* Settings Grid */
.sekhlo-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.sekhlo-setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sekhlo-setting-full {
    grid-column: 1 / -1;
}

.sekhlo-setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.sekhlo-setting-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Select, Radios, Checkboxes */
.sekhlo-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
}

.sekhlo-radio-group {
    display: flex;
    gap: 20px;
    padding: 4px 0;
}

.sekhlo-radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.sekhlo-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sekhlo-checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.sekhlo-checkbox-option:hover {
    background: #e2e8f0;
}

.sekhlo-checkbox-option.checked {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.sekhlo-checkbox-option input {
    display: none;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .sekhlo-settings-grid {
        grid-template-columns: 1fr;
    }

    .sekhlo-field-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sekhlo-progress-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

/* Fix for existing components to match new style */
.sekhlo-tab {
    font-size: 14px;
}

.sekhlo-tab.active {
    border-top-color: #6366f1;
    color: #6366f1;
}

.sekhlo-btn-primary {
    background: #6366f1;
}

.sekhlo-btn-primary:hover {
    background: #4f46e5;
}

.sekhlo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: #cbd5e1;
    color: #475569;
}

.sekhlo-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.sekhlo-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}


/* Specific button overrides to ensure white text */
#add-new-schema,
#add-new-schema:hover,
#add-new-schema:active,
#add-new-schema:focus {
    color: #ffffff !important;
    background: #2563eb !important;
}

#add-new-schema:hover {
    background: #1d4ed8 !important;
}

#add-new-schema:active {
    background: #1e40af !important;
}

#add-new-schema .dashicons {
    color: #ffffff !important;
}

/* Ensure all primary buttons have white text */
button.sekhlo-btn-primary,
button.sekhlo-btn-primary:hover,
button.sekhlo-btn-primary:active,
button.sekhlo-btn-primary:focus,
.sekhlo-btn.sekhlo-btn-primary,
.sekhlo-btn.sekhlo-btn-primary:hover,
.sekhlo-btn.sekhlo-btn-primary:active,
.sekhlo-btn.sekhlo-btn-primary:focus {
    color: #ffffff !important;
}

/* Meta Title & Description Tab Styles */
.sekhlo-meta-seo-container {
    max-width: 100%;
}

.sekhlo-meta-preview {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 16px;
}

#sekhlo-preview-title {
    font-size: 20px;
    color: #1a0dab;
    margin-bottom: 4px;
    font-weight: 400;
    line-height: 1.3;
    word-wrap: break-word;
}

#sekhlo-preview-desc {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.5;
    word-wrap: break-word;
}

.sekhlo-form-group {
    margin-bottom: 20px;
}

.sekhlo-form-group label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
}

#sekhlo-title-counter,
#sekhlo-desc-counter {
    font-size: 12px;
    color: #6b7280;
}

#sekhlo-title-status,
#sekhlo-desc-status {
    font-size: 12px;
    font-weight: 600;
}

/* Suggestion List Styles */
.sekhlo-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sekhlo-suggestion-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.sekhlo-suggestion-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggestion-info {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #1a0dab;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

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

.suggestion-meta {
    font-size: 12px;
    color: #6b7280;
}

.suggestion-action {
    margin-left: 16px;
}

/* URL Slug Field Styles */
#sekhlo_post_slug {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #111827;
    background: #ffffff;
}

#sekhlo_post_slug:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

#sekhlo-preview-url {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 4px;
    word-break: break-all;
    font-family: arial, sans-serif;
}

/* Meta field class for consistent styling */
.sekhlo-meta-field {
    transition: all 0.2s ease;
}

.sekhlo-meta-field:focus {
    outline: none;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* AI Prompt Generator Button */
.sekhlo-btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.sekhlo-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.sekhlo-btn-ai:active {
    transform: translateY(0);
}

.sekhlo-btn-ai .dashicons {
    color: #ffffff !important;
    font-size: 16px;
    width: 16px;
    height: 16px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sekhlo-btn-ai:hover .dashicons {
    animation-duration: 1s;
}

/* Modal Styles */
.sekhlo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sekhlo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.sekhlo-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 100001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sekhlo-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.sekhlo-modal-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.sekhlo-modal-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.sekhlo-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #ffffff;
}

.sekhlo-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sekhlo-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.sekhlo-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.sekhlo-modal-body::-webkit-scrollbar {
    width: 8px;
}

.sekhlo-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sekhlo-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.sekhlo-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .sekhlo-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .sekhlo-modal-header {
        padding: 20px;
    }
    
    .sekhlo-modal-body {
        padding: 20px;
    }
    
    .sekhlo-add-box-footer {
        flex-wrap: wrap;
    }
}

/* Copy success message animation */
#sekhlo-copy-prompt-msg {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* =============================================================
   Direct AI Generation Box (Feature 1)
   ============================================================= */

.sekhlo-ai-generate-box {
    margin-top: 16px;
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    padding: 16px 20px;
}

.sekhlo-ai-generate-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #4c1d95;
}

.sekhlo-ai-spark {
    font-size: 18px;
}

.sekhlo-ai-badge {
    background: #7c3aed;
    color: #fff;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sekhlo-ai-generate-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.sekhlo-btn-ai-direct {
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap;
    transition: opacity 0.2s !important;
    font-size: 13px !important;
}

.sekhlo-btn-ai-direct:hover {
    opacity: 0.9 !important;
}

.sekhlo-btn-ai-direct:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.sekhlo-ai-no-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #92400e;
    background: #fef3c7;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #fcd34d;
}

.sekhlo-ai-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.sekhlo-ai-loading {
    display: flex;
    align-items: center;
    color: #6b7280;
}

/* Spinning animation for AI icon */
@keyframes sekhlo-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sekhlo-spin {
    animation: sekhlo-spin 1s linear infinite;
    display: inline-block;
}

/* =========================================================
   EEAT Wizard Styles
   ========================================================= */
.sekhlo-eeat-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.sekhlo-eeat-field {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.sekhlo-eeat-field:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
textarea.sekhlo-eeat-field {
    font-family: inherit;
}
@media (max-width: 600px) {
    .sekhlo-eeat-grid {
        grid-template-columns: 1fr !important;
    }
}
