/* Custom demo forms – chained selects, themes, mobile-first */

.cdf-demo {
    --cdf-accent: #2563eb;
    --cdf-accent-hover: #1d4ed8;
    --cdf-surface: #ffffff;
    --cdf-border: #e2e8f0;
    --cdf-text: #1e293b;
    --cdf-muted: #64748b;
    --cdf-radius: 12px;
    --cdf-focus: 0 0 0 3px rgba(37, 99, 235, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--cdf-text);
    background: var(--cdf-surface);
}

.cdf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cdf-header-text {
    flex: 1 1 280px;
    min-width: 0;
}

.cdf-industry-bar {
    display: block;
    padding: 0.85rem 1.5rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--cdf-border);
}

.cdf-industry-bar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.cdf-industry-tagline {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #475569;
    max-width: 52rem;
}

.cdf-industry-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cdf-muted);
    flex-shrink: 0;
}

.cdf-industry-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cdf-industry-chip {
    min-height: 38px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--cdf-border);
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cdf-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.cdf-industry-chip:hover,
.cdf-industry-chip:focus {
    border-color: var(--cdf-accent);
    color: var(--cdf-accent);
    outline: none;
}

.cdf-industry-chip.active {
    background: var(--cdf-accent);
    border-color: var(--cdf-accent);
    color: #fff;
}

.cdf-calculator {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--cdf-radius);
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.cdf-calc-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #92400e;
}

.cdf-calc-hint {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
    color: #78716c;
    line-height: 1.5;
}

.cdf-material-filters {
    margin-bottom: 0.85rem;
}

.cdf-filter-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.cdf-filter-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: #78716c;
}

.cdf-filter-tag {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    text-transform: capitalize;
}

.cdf-calc-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.cdf-calc-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--cdf-text);
}

.cdf-calc-input {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.cdf-calc-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.cdf-calc-results {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.3rem 0.75rem;
    margin: 0;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #fde68a;
    font-size: 0.88rem;
}

.cdf-calc-results dt {
    color: var(--cdf-muted);
}

.cdf-calc-results dd {
    margin: 0;
    font-weight: 700;
    color: #92400e;
}

.form-theme-premium .cdf-calculator {
    background: #1e293b;
    border-color: #475569;
}

.form-theme-premium .cdf-calc-title,
.form-theme-premium .cdf-calc-results dd {
    color: #fcd34d;
}

.form-theme-premium .cdf-calc-results {
    background: #0f172a;
    border-color: #334155;
}

.cdf-calculator-promo {
    background: #f0fdf4;
    border-color: #86efac;
}

.cdf-calculator-promo .cdf-calc-title {
    color: #166534;
}

.cdf-calculator-promo .cdf-calc-input {
    border-color: #86efac;
}

.cdf-discount-save {
    color: #15803d !important;
}

.cdf-discount-final {
    color: #166534 !important;
    font-size: 1.05rem !important;
}

.cdf-discount-warn {
    color: #b45309 !important;
}

.cdf-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--cdf-border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.cdf-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.cdf-header p {
    margin: 0;
    color: var(--cdf-muted);
    font-size: 0.92rem;
    max-width: 42rem;
    line-height: 1.5;
}

.cdf-scenario-wrap label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cdf-muted);
    margin-bottom: 0.35rem;
}

.cdf-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--cdf-border);
    background: #fff;
}

.cdf-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 360px;
}

.cdf-search-input {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--cdf-border);
    border-radius: 10px;
    font-size: 1rem;
}

.cdf-search-input:focus {
    outline: none;
    border-color: var(--cdf-accent);
    box-shadow: var(--cdf-focus);
}

.cdf-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--cdf-border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
}

.cdf-search-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.cdf-search-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--cdf-text);
}

.cdf-search-item span {
    display: block;
    font-size: 0.78rem;
    color: var(--cdf-muted);
    margin-top: 0.15rem;
}

.cdf-search-item:hover,
.cdf-search-item:focus {
    background: #eff6ff;
    outline: none;
}

.cdf-search-empty {
    padding: 0.85rem;
    color: var(--cdf-muted);
    font-size: 0.88rem;
}

.cdf-theme-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cdf-theme-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cdf-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cdf-theme-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cdf-theme-btn {
    min-height: 38px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--cdf-border);
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--cdf-muted);
}

.cdf-theme-btn.active,
.cdf-theme-btn:hover {
    border-color: var(--cdf-accent);
    color: var(--cdf-accent);
    background: #eff6ff;
}

.cdf-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0;
    align-items: start;
}

.cdf-form-panel {
    padding: 1.25rem 1.5rem 1.75rem;
    border-right: 1px solid var(--cdf-border);
}

.cdf-panel-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.cdf-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    min-height: 2rem;
}

.cdf-crumb-empty {
    color: var(--cdf-muted);
    font-size: 0.88rem;
}

.cdf-crumb {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.cdf-crumb:hover,
.cdf-crumb:focus {
    background: #dbeafe;
    outline: none;
}

.cdf-crumb-sep {
    color: #94a3b8;
    font-size: 0.85rem;
}

.cdf-select-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cdf-field {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--cdf-border);
    border-radius: var(--cdf-radius);
    background: #fff;
}

.cdf-field.is-loading::after {
    content: 'Loading…';
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 0.78rem;
    color: var(--cdf-muted);
}

.cdf-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cdf-field-label {
    font-weight: 700;
    font-size: 0.92rem;
}

.cdf-tooltip-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--cdf-border);
    background: #f8fafc;
    color: var(--cdf-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.cdf-select {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--cdf-border);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: var(--cdf-text);
}

.cdf-select:focus {
    outline: none;
    border-color: var(--cdf-accent);
    box-shadow: var(--cdf-focus);
}

.cdf-select:disabled {
    background: #f8fafc;
    color: #94a3b8;
}

.cdf-reset-level {
    margin-top: 0.55rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--cdf-accent);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
}

.cdf-reset-level:hover,
.cdf-reset-level:focus {
    text-decoration: underline;
    outline: none;
}

.cdf-mobile-picker-btn {
    display: none;
    width: 100%;
    min-height: 48px;
    margin-top: 0.5rem;
    border: 2px solid var(--cdf-accent);
    border-radius: 10px;
    background: #eff6ff;
    color: var(--cdf-accent);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.cdf-empty-hint {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--cdf-muted);
    font-size: 0.88rem;
}

.cdf-validation {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.88rem;
}

.cdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.cdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s;
}

.cdf-btn-primary {
    background: var(--cdf-accent);
    color: #fff;
}

.cdf-btn-primary:hover {
    background: var(--cdf-accent-hover);
}

.cdf-btn-secondary {
    background: #f1f5f9;
    color: var(--cdf-text);
    border: 1px solid var(--cdf-border);
}

.cdf-btn-ghost {
    background: transparent;
    color: var(--cdf-muted);
    border: 1px dashed var(--cdf-border);
}

.cdf-summary {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: var(--cdf-radius);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.cdf-summary h4 {
    margin: 0 0 0.35rem;
    color: #166534;
}

.cdf-summary p {
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.cdf-meta-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
}

.cdf-meta-list dt {
    color: var(--cdf-muted);
    text-transform: capitalize;
}

.cdf-meta-list dd {
    margin: 0;
    font-weight: 600;
}

.cdf-meta-list dd.cdf-summary-price {
    font-size: 1.15rem;
    color: #166534;
}

.cdf-price-hint {
    margin: 0;
    font-size: 0.92rem;
    color: var(--cdf-muted);
    line-height: 1.45;
}

.cdf-side-panels {
    padding: 1.25rem 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #f8fafc;
}

.cdf-info-card {
    background: #fff;
    border: 1px solid var(--cdf-border);
    border-radius: var(--cdf-radius);
    padding: 1rem 1.05rem;
}

.cdf-info-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
}

.cdf-info-card p,
.cdf-info-card li {
    margin: 0;
    color: var(--cdf-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.cdf-info-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

.cdf-checklist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.cdf-checklist li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.35rem;
}

.cdf-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
}

.cdf-price-range {
    margin-top: 0.65rem !important;
}

.cdf-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: rgba(255, 255, 255, 0.85);
    padding: 1rem;
}

.cdf-video-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cdf-dev-json {
    margin: 0;
    padding: 0.75rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 0.75rem;
    overflow-x: auto;
    max-height: 220px;
}

/* Theme variants */
.form-theme-commerce {
    --cdf-accent: #7c3aed;
    --cdf-accent-hover: #6d28d9;
    --cdf-focus: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.form-theme-trade {
    --cdf-accent: #ea580c;
    --cdf-accent-hover: #c2410c;
    --cdf-focus: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.form-theme-trade .cdf-header {
    background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.form-theme-premium {
    --cdf-accent: #a78bfa;
    --cdf-accent-hover: #8b5cf6;
    --cdf-surface: #0f172a;
    --cdf-border: #334155;
    --cdf-text: #f8fafc;
    --cdf-muted: #94a3b8;
    --cdf-focus: 0 0 0 3px rgba(167, 139, 250, 0.25);
    background: #0f172a;
}

.form-theme-premium .cdf-header,
.form-theme-premium .cdf-toolbar,
.form-theme-premium .cdf-side-panels {
    background: #111827;
}

.form-theme-premium .cdf-field,
.form-theme-premium .cdf-info-card,
.form-theme-premium .cdf-search-results {
    background: #1e293b;
}

.form-theme-premium .cdf-select,
.form-theme-premium .cdf-search-input {
    background: #0f172a;
    color: #f8fafc;
}

.form-theme-premium .cdf-summary {
    background: #14532d;
    border-color: #166534;
}

.form-theme-compact-admin {
    --cdf-accent: #0891b2;
    --cdf-accent-hover: #0e7490;
    --cdf-radius: 8px;
    --cdf-focus: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.form-theme-compact-admin .cdf-field {
    padding: 0.75rem;
}

.form-theme-compact-admin .cdf-select,
.form-theme-compact-admin .cdf-search-input,
.form-theme-compact-admin .cdf-btn {
    min-height: 40px;
    font-size: 0.88rem;
}

/* Mobile sheet */
.cdf-mobile-sheet {
    position: fixed;
    inset: 0;
    z-index: 500;
}

.cdf-mobile-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.cdf-mobile-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 70vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    animation: cdfSlideUp 0.25s ease;
}

@keyframes cdfSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cdf-mobile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--cdf-border);
}

.cdf-sheet-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.cdf-mobile-sheet-list {
    overflow-y: auto;
    max-height: calc(70vh - 56px);
}

.cdf-mobile-option {
    display: block;
    width: 100%;
    text-align: left;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.cdf-mobile-option.selected {
    background: #eff6ff;
    font-weight: 700;
}

.cdf-mobile-option:hover,
.cdf-mobile-option:focus {
    background: #f8fafc;
    outline: none;
}

/* Responsive */
@media (max-width: 900px) {
    .cdf-layout {
        grid-template-columns: 1fr;
    }

    .cdf-form-panel {
        border-right: none;
        border-bottom: 1px solid var(--cdf-border);
    }
}

@media (max-width: 640px) {
    .cdf-header,
    .cdf-toolbar,
    .cdf-form-panel,
    .cdf-side-panels {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .cdf-select {
        font-size: 16px;
    }

    .cdf-mobile-picker-btn {
        display: block;
    }

    .cdf-touch-select {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        height: 0;
        width: 0;
    }

    .cdf-field {
        position: relative;
    }
}

/* Demo page wrapper (outside browser frame) */
.dcs-demo-wrap {
    background: #fff;
    min-height: 520px;
}

.dcs-demo-nav {
    background: #0f766e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.dcs-demo-nav .logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: #99f6e4;
}

.dcs-demo-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.dcs-demo-nav .spacer {
    flex: 1;
}

.dcs-demo-hero {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.dcs-demo-hero h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dcs-demo-hero__tagline {
    margin: 0.55rem auto 0;
    max-width: 640px;
    opacity: 0.92;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #fff;
}

.dcs-demo-hero__tagline {
    margin: 0.55rem auto 0;
    max-width: 640px;
    opacity: 0.92;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #fff;
}

.dcs-demo-hero__note {
    margin: 0.65rem auto 0;
    max-width: 720px;
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.9;
    color: #ecfdf5;
}

/* Visual option cards */
.cdf-select-visual-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cdf-option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.cdf-option-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    border: 2px solid var(--cdf-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.cdf-option-card:hover {
    border-color: var(--cdf-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.cdf-option-card.selected {
    border-color: var(--cdf-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.cdf-card-img {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
}

.cdf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdf-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #94a3b8;
    aspect-ratio: 4/3;
    background: #f8fafc;
}

.cdf-card-body {
    padding: 0.45rem 0.5rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cdf-card-body strong {
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--cdf-text);
}

.cdf-card-price {
    font-size: 0.72rem;
    font-weight: 700;
    color: #15803d;
}

.cdf-card-meta {
    font-size: 0.68rem;
    color: var(--cdf-muted);
}

/* Selection hero preview */
.cdf-selection-hero {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--cdf-radius);
    background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
    border: 1px solid #bae6fd;
    animation: cdf-fade-in 0.35s ease;
}

.cdf-hero-img-wrap {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #e2e8f0;
}

.cdf-hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdf-hero-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cdf-muted);
}

.cdf-hero-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: var(--cdf-text);
}

.cdf-hero-path {
    margin: 0;
    font-size: 0.82rem;
    color: var(--cdf-muted);
    line-height: 1.45;
}

/* Progress stepper */
.cdf-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1rem;
}

.cdf-progress-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--cdf-muted);
}

.cdf-progress-dot {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    background: #e2e8f0;
    color: #64748b;
}

.cdf-progress-step--active .cdf-progress-dot {
    background: var(--cdf-accent);
    color: #fff;
}

.cdf-progress-step--done .cdf-progress-dot {
    background: #166534;
    color: #fff;
}

.cdf-progress-step--active .cdf-progress-label {
    font-weight: 700;
    color: var(--cdf-accent);
}

.cdf-progress-step--done .cdf-progress-label {
    color: #166534;
}

.cdf-crumb-img {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.cdf-view-toggle--prominent button {
    min-height: 36px;
    padding: 0.35rem 0.85rem;
    font-weight: 700;
}

.cdf-search-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
}

.cdf-search-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cdf-search-thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 1.1rem;
}

.cdf-search-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

@keyframes cdf-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-theme-commerce .cdf-selection-hero {
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    border-color: #fed7aa;
}

.form-theme-commerce {
    --cdf-accent: #ea580c;
    --cdf-accent-hover: #c2410c;
}

.dcs-demo-body {
    padding: 0;
    background: #fff;
}

.dcs-demo-body .demo-tier-teaser {
    margin: 0.85rem 1.5rem 0;
}

.cdf-dev-panel-inline {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.cdf-dev-panel-inline.is-open,
.cdf-dev-panel-inline:not([hidden]) {
    display: block;
}

.cdf-dev-panel-inline h4 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.cdf-dev-hint {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

.cdf-admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.cdf-admin-card-head h4 {
    margin: 0;
}

.cdf-admin-card-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.cdf-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    min-height: 32px;
}

.cdf-admin-hint {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.cdf-admin-tree {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
    background: #fff;
    font-size: 0.82rem;
}

.cdf-tree-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}

.cdf-tree-toggle,
.cdf-tree-spacer {
    width: 1.25rem;
    flex-shrink: 0;
    text-align: center;
}

.cdf-tree-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-size: 0.7rem;
    color: #64748b;
}

.cdf-tree-label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: #334155;
}

.cdf-tree-meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.cdf-tree-add {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}

.cdf-tree-add:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.cdf-tree-children {
    margin-left: 1rem;
    border-left: 1px dashed #e2e8f0;
    padding-left: 0.35rem;
}

.cdf-admin-add-form {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.cdf-admin-add-form h5 {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
}

.cdf-admin-field {
    margin-bottom: 0.5rem;
}

.cdf-admin-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.2rem;
}

.cdf-admin-field input {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
}

.cdf-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.65rem;
    cursor: help;
    margin-left: 0.15rem;
}

.cdf-admin-add-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.5rem;
}
