:root {
    --qcld-faq-primary: #4f46e5;
    --qcld-faq-primary-hover: #4338ca;
    --qcld-faq-bg-soft: #f8fafc;
    --qcld-faq-border: #e2e8f0;
    --qcld-faq-text: #1e293b;
    --qcld-faq-text-muted: #64748b;
    --qcld-faq-radius: 12px;
    --qcld-faq-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --qcld-faq-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.qcld-faq-data-meta-container {
    padding: 10px 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Tabs Navigation */
.qcld-faq-data-tabs.nav-tab-wrapper {
    border-bottom: 2px solid var(--qcld-faq-border);
    margin-bottom: 25px;
    padding-left: 0;
    display: flex;
    gap: 10px;
}

.qcld-faq-data-tabs .nav-tab {
    border: none;
    background: transparent;
    color: var(--qcld-faq-text-muted);
    font-weight: 600;
    padding: 10px 15px;
    margin: 0;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.qcld-faq-data-tabs .nav-tab:hover {
    color: var(--qcld-faq-primary);
    background: rgba(79, 70, 229, 0.05);
}

.qcld-faq-data-tabs .nav-tab-active {
    color: var(--qcld-faq-primary) !important;
    background: transparent !important;
}

.qcld-faq-data-tabs .nav-tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--qcld-faq-primary);
}

.qcld-faq-data-tabs .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Toggle Row */
.qcld-faq-data-toggle-row {
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--qcld-faq-radius);
    border: 1px solid var(--qcld-faq-border);
    margin-bottom: 25px;
    box-shadow: var(--qcld-faq-shadow-sm);
    display: flex;
    align-items: center;
}

.qcld-faq-data-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--qcld-faq-text);
}

.qcld-faq-data-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--qcld-faq-border);
    border-radius: 4px;
    margin-right: 12px !important;
    transition: all 0.2s ease;
}

.qcld-faq-data-checkbox-label input[type="checkbox"]:checked {
    background-color: var(--qcld-faq-primary);
    border-color: var(--qcld-faq-primary);
}

/* FAQ Rows - Cards */
.qcld-faq-data-row {
    background: #fff;
    border: 1px solid var(--qcld-faq-border);
    border-radius: var(--qcld-faq-radius);
    margin-bottom: 16px;
    box-shadow: var(--qcld-faq-shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qcld-faq-data-row:hover {
    box-shadow: var(--qcld-faq-shadow);
}

.qcld-faq-data-row-header {
    background: var(--qcld-faq-bg-soft);
    padding: 10px 15px;
    border-bottom: 1px solid var(--qcld-faq-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qcld-faq-data-drag-handle {
    color: var(--qcld-faq-text-muted);
    cursor: grab;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.qcld-faq-data-drag-handle:hover {
    background: rgba(0,0,0,0.05);
    color: var(--qcld-faq-text);
}

.qcld-faq-data-remove-btn {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.qcld-faq-data-remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

.qcld-faq-data-row-body {
    padding: 20px;
}

.qcld-faq-data-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--qcld-faq-text);
    font-size: 13px;
}

.qcld-faq-data-field-group input[type="text"],
.qcld-faq-data-field-group input[type="url"],
.qcld-faq-data-field-group textarea {
    width: 100%;
    border: 1px solid var(--qcld-faq-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.qcld-faq-data-field-group input:focus,
.qcld-faq-data-field-group textarea:focus {
    border-color: var(--qcld-faq-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Actions */
.qcld-faq-data-actions {
    margin-top: 20px;
}

.qcld-faq-usage-guide .qcld-faq-badge-pro {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: middle;
}

/* AI Spinner */
.qcld-spin {
    animation: qcld-rotate 2s linear infinite;
    display: inline-block;
}

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

.qcld-faq-data-openai-panel {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Segmented Control / AI Source Toggle */
.qcld-faq-ai-source-toggle {
    display: flex;
    position: relative;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    width: fit-content;
    border: 1px solid #e2e8f0;
}

.qcld-faq-ai-source-toggle input {
    display: none;
}

.qcld-faq-ai-source-toggle label {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
    color: #64748b;
    margin: 0 !important;
}

.qcld-faq-ai-source-toggle input:checked + label {
    color: #ffffff;
}

.qcld-faq-ai-toggle-glider {
    position: absolute;
    display: flex;
    height: calc(100% - 8px);
    width: 0; 
    background-color: #4f46e5;
    z-index: 0;
    border-radius: 6px;
    transition: 0.3s ease-out;
}

/* Calculate glider position and width based on labels */
.qcld-faq-ai-source-toggle label:nth-of-type(1) { width: 120px; }
.qcld-faq-ai-source-toggle label:nth-of-type(2) { width: 140px; }

#ai-source-prompt:checked ~ .qcld-faq-ai-toggle-glider {
    transform: translateX(0);
    width: 120px;
}

#ai-source-content:checked ~ .qcld-faq-ai-toggle-glider {
    transform: translateX(140px);
    width: 140px;
}

#qcld-faq-data-add-row {
    background: var(--qcld-faq-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#qcld-faq-data-add-row:hover {
    background: var(--qcld-faq-primary-hover);
}

#qcld-faq-data-add-row:active {
    transform: scale(0.98);
}

/* Sortable Placeholder */
.qcld-faq-data-row-placeholder {
    border: 2px dashed var(--qcld-faq-primary);
    background: rgba(79, 70, 229, 0.02);
    height: 100px;
    margin-bottom: 16px;
    border-radius: var(--qcld-faq-radius);
}

/* WebPage Panel Styling */
.qcld-faq-data-webpage-panel {
    background: #fff;
    padding: 25px;
    border-radius: var(--qcld-faq-radius);
    border: 1px solid var(--qcld-faq-border);
    box-shadow: var(--qcld-faq-shadow-sm);
}

.qcld-faq-data-webpage-panel .description {
    margin-bottom: 10px;
    color: var(--qcld-faq-text-muted);
    font-style: italic;
}

/* JSON Preview */
.qcld-faq-data-json-panel {
    background: #0f172a;
    border-radius: var(--qcld-faq-radius);
    padding: 20px;
    box-shadow: var(--qcld-faq-shadow);
    overflow: scroll;
}

.qcld-faq-data-json-panel .description {
    color: #94a3b8;
    margin-bottom: 15px;
}

#qcld-faq-data-json-preview {
    background: transparent !important;
    color: #38bdf8 !important;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 0 !important;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qcld-faq-data-tab-active-content {
    animation: fadeInDown 0.3s ease-out;
}

/* Settings Page Styles */
.qcld-faq-settings-container {
    max-width: 100%;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.qcld-seo-help .qcld-faq-settings-container table.form-table {
    background: #fff;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #fff;
}

.qcld-faq-usage-guide {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.qcld-faq-usage-guide h3 {
    margin-top: 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qcld-faq-badge-pro {
    display: inline-flex;
    background: #4f46e5;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.qcld-faq-usage-section-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.qcld-faq-code-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.qcld-faq-code-block:last-child {
    margin-bottom: 0;
}

.qcld-faq-code-block code {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.qcld-faq-code-basic { color: #4f46e5; }
.qcld-faq-code-adv { color: #db2777; }

.qcld-faq-settings-container .submit {
    margin-top: 30px;
}

.qcld-faq-settings-container input.button-primary {
    padding: 6px 20px;
    height: auto;
    font-weight: 600;
}

/* Modern Switch Toggle Styles */
.qc-faq-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

.qc-faq-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.qc-faq-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .qc-faq-slider {
    background-color: #4f46e5;
}

input:focus + .qc-faq-slider {
    box-shadow: 0 0 1px #4f46e5;
}

input:checked + .qc-faq-slider:before {
    transform: translateX(20px);
}

.qc-faq-switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Modern Help Modal Styling */
.qcld-faq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.qcld-faq-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.qcld-faq-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 850px;
    max-height: 85vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qcld-faq-modal-overlay.is-open .qcld-faq-modal-container {
    transform: scale(1);
}

.qcld-faq-modal-header {
    background: #4f46e5;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.qcld-faq-modal-header h3 {
    margin: 0;
    color: #ffffff;
    background: transparent !important;
    border: none;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qcld-faq-modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
    line-height: 36px;
}

.qcld-faq-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.qcld-faq-modal-body {
    padding: 24px;
    overflow: hidden;
    flex: 1;
    display: flex;
    gap: 16px;
    min-height: 480px;
}

/* Sidebar Tab list inside Modal */
.qcld-faq-modal-sidebar {
    width: 170px;
    border-right: 1px solid #e2e8f0;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.qcld-faq-modal-tab-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.qcld-faq-modal-tab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.qcld-faq-modal-tab-btn.is-active {
    background: #e0e7ff;
    color: #4f46e5;
}

.qcld-faq-modal-content-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.qcld-faq-modal-tab-content {
    display: none;
    animation: modalFadeIn 0.3s ease;
}

.qcld-faq-modal-tab-content.is-active {
    display: block;
}

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

.qcld-faq-feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.qcld-faq-feature-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qcld-faq-feature-card p {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.qcld-faq-help-badge {
    background: #4f46e5;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.qcld-faq-code-snippet {
    background: #0f172a;
    color: #38bdf8;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

/* Feature Screenshots Styles */
.qcld-faq-screenshots-gallery {
    margin-top: 25px;
}

.qcld-faq-screenshots-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.qcld-faq-screenshots-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 12px;
}

.qcld-faq-screenshot-item {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.06);
    background: #f8fafc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qcld-faq-screenshot-item:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.qcld-faq-screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

.qcld-faq-screenshot-caption {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-align: left;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

