/* ═══════════════════════════════════════════════════════════════════
   ONDEMAND — Widgets Catalog page styles
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Hero ───────────────────────────────────────── */
.wdg-hero {
    text-align: center;
    padding: 120px 40px 50px;
}

.wdg-hero-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.wdg-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
}

/* ─── Breadcrumb ─────────────────────────────────── */
.wdg-breadcrumb {
    padding: 100px 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.wdg-breadcrumb a {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.wdg-breadcrumb a:hover {
    color: var(--orange);
}

/* ─── Catalog Grid ───────────────────────────────── */
.wdg-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.wdg-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s, transform 0.25s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.wdg-card--available:hover {
    border-color: rgba(231,92,11,0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(231,92,11,0.08);
}

.wdg-card--upcoming {
    opacity: 0.6;
    border-style: dashed;
}

.wdg-card--upcoming:hover {
    opacity: 0.8;
    border-color: rgba(255,255,255,0.15);
}

.wdg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wdg-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(231,92,11,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wdg-card--upcoming .wdg-card-icon {
    background: rgba(255,255,255,0.04);
}

.wdg-card-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--orange);
}

.wdg-card--upcoming .wdg-card-icon .material-symbols-outlined {
    color: var(--text-dim);
}

.wdg-card-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
}

.wdg-card-status.available {
    background: rgba(76,175,80,0.12);
    color: #4caf50;
    border: 1px solid rgba(76,175,80,0.25);
}

.wdg-card-status.upcoming {
    background: rgba(255,152,0,0.1);
    color: #ff9800;
    border: 1px solid rgba(255,152,0,0.2);
}

.wdg-card-status.planned {
    background: rgba(120,144,156,0.1);
    color: #90a4ae;
    border: 1px solid rgba(120,144,156,0.2);
}

.wdg-card h3 {
    font-size: 1.05rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    margin-bottom: 8px;
}

.wdg-card-desc {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: 14px;
    flex: 0;
}

.wdg-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.wdg-card-tags span {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.68rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-dim);
}

/* Preview */
.wdg-card-preview {
    flex: 1;
    min-height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15,15,22,0.8);
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.wdg-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wdg-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    color: rgba(255,255,255,0.15);
    text-align: center;
}

.wdg-preview-placeholder .material-symbols-outlined {
    font-size: 40px;
}

.wdg-preview-placeholder span:last-child {
    font-size: 0.78rem;
}

.wdg-card-footer {
    text-align: right;
}

.wdg-card-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--orange);
    transition: opacity 0.2s;
}

.wdg-card--available:hover .wdg-card-link {
    opacity: 0.8;
}

/* ─── Widget Detail ──────────────────────────────── */
.wdg-detail {
    padding: 40px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.wdg-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.wdg-detail-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(231,92,11,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wdg-detail-icon .material-symbols-outlined {
    font-size: 28px;
    color: var(--orange);
}

.wdg-detail-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.wdg-detail-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 2px 0 0;
}

.wdg-badge-available {
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(76,175,80,0.12);
    color: #4caf50;
    border: 1px solid rgba(76,175,80,0.25);
}

/* ─── Detail Body (2 columns) ────────────────────── */
.wdg-detail-body {
    display: flex;
    gap: 40px;
}

.wdg-detail-info {
    flex: 1;
    min-width: 0;
}

.wdg-detail-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.wdg-detail-demo {
    width: 420px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
}

/* ─── Features Grid ──────────────────────────────── */
.wdg-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.wdg-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
}

.wdg-feature .material-symbols-outlined {
    font-size: 20px;
    color: var(--orange);
    margin-top: 2px;
}

.wdg-feature strong {
    display: block;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 2px;
}

.wdg-feature span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ─── Code Section ───────────────────────────────── */
.wdg-code-section {
    margin-bottom: 32px;
}

.wdg-code-section h3,
.wdg-attrs h3 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.wdg-code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
}

.wdg-code-tab {
    padding: 8px 20px;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    background: rgba(255,255,255,0.02);
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wdg-code-tab.active {
    background: rgba(20,20,30,0.95);
    color: var(--orange);
    border-color: rgba(255,255,255,0.1);
}

.wdg-code-panel {
    display: none;
}

.wdg-code-panel.active {
    display: block;
}

.wdg-code-block {
    border-radius: 0 10px 10px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15,15,22,0.95);
    overflow: hidden;
}

.wdg-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.wdg-copy-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
}

.wdg-copy-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.wdg-code-block pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.6;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #c5c8d4;
}

.wdg-code-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 10px;
    padding-left: 4px;
}

/* ─── Attributes Table ───────────────────────────── */
.wdg-attrs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.wdg-attrs-table th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid rgba(255,255,255,0.08);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wdg-attrs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-dim);
}

.wdg-attrs-table code {
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(231,92,11,0.1);
    color: var(--orange);
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Demo Panel ─────────────────────────────────── */
.wdg-demo-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(20,20,30,0.95);
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.wdg-demo-presets {
    display: flex;
    gap: 4px;
}

.wdg-demo-preset {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wdg-demo-preset.active {
    background: rgba(231,92,11,0.12);
    border-color: rgba(231,92,11,0.3);
    color: var(--orange);
}

.wdg-demo-preset:hover:not(.active) {
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

/* ── Inject Buttons ──────────────────────────── */
.wdg-inject-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    transition: opacity 0.2s;
    background: #4CAF50;
    color: #fff;
}
.wdg-inject-btn:hover { opacity: 0.85; }
.wdg-inject-btn--dest { background: #F44336; }
.wdg-inject-btn--reset { background: rgba(255,255,255,0.08); color: var(--text-dim); }

.wdg-demo-frame {
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: none;
    overflow: hidden;
    background: #0d0d11;
}

/* ── Device toggle (Desktop / Mobile) ────────────── */
.wdg-device-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.wdg-device-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.wdg-device-btn .material-symbols-outlined { font-size: 16px; }
.wdg-device-btn:hover { color: rgba(255,255,255,0.7); }
.wdg-device-btn.active {
    background: rgba(255,140,0,0.15);
    color: var(--orange);
    border-color: rgba(255,140,0,0.3);
}
/* Mobile frame simulation */
.wdg-demo-container.wdg-mobile {
    max-width: 375px;
    margin: 0 auto;
    border-radius: 24px;
    border: 3px solid rgba(255,255,255,0.12);
    padding: 12px 6px;
    background: #111;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transition: max-width 0.3s ease, border-radius 0.3s ease, padding 0.3s ease;
}
/* Fullwidth mode — hide left column, widget spans full width */
.wdg-detail-body.wdg-fullwidth > .wdg-detail-info {
    display: none;
}
.wdg-detail-body.wdg-fullwidth > .wdg-detail-demo {
    width: 100%;
    min-width: 0;
}

/* ─── Parameter Controls ─────────────────────────── */
.wdg-params {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-top: none;
    align-items: flex-end;
}

.wdg-params-row {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    flex-wrap: wrap;
    align-items: center;
}

/* Mode category blocks flow inline when space permits */
.wdg-mode-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-basis: 100%;
}

.wdg-mode-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wdg-param {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 90px;
}

.wdg-param-wide {
    flex: 2;
}

.wdg-param-compact {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: auto;
}

.wdg-param-number {
    width: 64px;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.75rem;
    font-family: inherit;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.wdg-param-number::-webkit-inner-spin-button,
.wdg-param-number::-webkit-outer-spin-button {
    opacity: 1;
}

.wdg-param-number:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(255,140,0,0.08);
}

.wdg-param-check {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: auto;
    cursor: pointer;
}

.wdg-param-check input[type="checkbox"] {
    accent-color: var(--orange);
    width: 14px;
    height: 14px;
}

/* ── Icon Toggle Buttons (3-state: on / off / hidden) ─── */
.wdg-icon-toggles {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.wdg-icon-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.wdg-icon-toggle .material-symbols-outlined {
    font-size: 18px;
}

/* State: ON — affiché et activé */
.wdg-icon-toggle[data-state="on"] {
    background: rgba(255,140,0,0.15);
    color: var(--orange);
    border-color: rgba(255,140,0,0.3);
}

/* State: OFF — affiché et désactivé (style nearby: dashed border) */
.wdg-icon-toggle[data-state="off"] {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.15);
    border-style: dashed;
}

/* State: HIDDEN — masqué = style OFF + barre diagonale */
.wdg-icon-toggle[data-state="hidden"] {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.15);
    border-style: dashed;
}

.wdg-icon-toggle[data-state="hidden"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 4px;
    background: linear-gradient(
        to top right,
        transparent calc(50% - 0.75px),
        rgba(255,80,80,0.5) calc(50% - 0.75px),
        rgba(255,80,80,0.5) calc(50% + 0.75px),
        transparent calc(50% + 0.75px)
    );
    pointer-events: none;
}

/* Hover */
.wdg-icon-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.wdg-icon-toggle[data-state="on"]:hover {
    background: rgba(255,140,0,0.25);
}

/* ── Custom Tooltip ──────────────────────────── */
.wdg-icon-toggle[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(20,20,30,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e0e0;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.wdg-icon-toggle[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Backward compat: simple on class (for non-mode toggles) */
.wdg-icon-toggle--on {
    background: rgba(255,140,0,0.15);
    color: var(--orange);
    border-color: rgba(255,140,0,0.3);
}

.wdg-icon-toggle--on:hover {
    background: rgba(255,140,0,0.25);
}

/* Mode 3-state: off = dashed border, dim */
.wdg-icon-toggle--off {
    color: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.15);
    border-style: dashed;
}

/* Mode 3-state: hidden = off style + strikethrough */
.wdg-icon-toggle--hidden {
    color: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.15);
    border-style: dashed;
}

/* Group label for mode categories */
.wdg-param-group-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    width: 100%;
}

.wdg-icon-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.12);
    margin: 0 4px;
}

/* ── Color Picker & Hex Input ────────────────── */
.wdg-color-picker {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 2px;
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.wdg-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.wdg-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.wdg-hex-input {
    width: 64px;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.7rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    text-align: center;
    text-transform: uppercase;
}

.wdg-hex-input:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(255,140,0,0.08);
}

.wdg-hidden {
    display: none !important;
}

/* Theme toggle state accents */
.wdg-icon-toggle[data-theme-state="light"] {
    background: rgba(255,235,59,0.15);
    color: #fdd835;
    border-color: rgba(255,235,59,0.3);
}

.wdg-icon-toggle[data-theme-state="dark"] {
    background: rgba(100,120,255,0.15);
    color: #7986cb;
    border-color: rgba(100,120,255,0.3);
}

.wdg-param-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wdg-param-section-label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.wdg-param-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.wdg-param-val {
    font-weight: 700;
    color: var(--orange);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}

.wdg-param-input,
.wdg-param-select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    transition: border-color 0.2s;
}

.wdg-param-input:focus,
.wdg-param-select:focus {
    outline: none;
    border-color: var(--orange);
}

.wdg-param-range {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    outline: none;
    margin-top: 4px;
}

.wdg-param-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    border: 2px solid rgba(0,0,0,0.3);
}

.wdg-param-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--orange);
    cursor: pointer;
    border: 2px solid rgba(0,0,0,0.3);
}

.wdg-params-apply {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid var(--orange);
    border-radius: 6px;
    background: transparent;
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    align-self: flex-end;
}

.wdg-params-apply:hover {
    background: var(--orange);
    color: #000;
}

/* Theme toggle */
.wdg-theme-toggle {
    display: flex;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    overflow: hidden;
}

.wdg-theme-btn {
    flex: 1;
    padding: 5px 10px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.wdg-theme-btn + .wdg-theme-btn {
    border-left: 1px solid rgba(255,255,255,0.12);
}

.wdg-theme-btn.active {
    background: var(--orange);
    color: #000;
    font-weight: 600;
}

.wdg-theme-btn:hover:not(.active) {
    background: rgba(255,255,255,0.06);
}

/* Full-width params row */
.wdg-params-row--full {
    flex-basis: 100%;
}

.wdg-params-row--full .wdg-param-wide {
    flex: 1;
    min-width: 0;
}

/* Autocomplete dropdown */
.wdg-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.wdg-autocomplete-list:empty {
    display: none;
}

.wdg-ac-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.wdg-ac-item:hover,
.wdg-ac-item--active {
    background: rgba(255,165,0,0.12);
}

.wdg-ac-main {
    font-weight: 500;
    line-height: 1.3;
}

.wdg-ac-context {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.2;
}

.wdg-ac-empty {
    padding: 10px 12px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-style: italic;
}

/* Region badge */
#wdg-p-region-badge {
    margin-left: 8px;
    font-size: 0.7rem;
    background: rgba(255,165,0,0.15);
    color: var(--orange);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ─── Upcoming Widgets ───────────────────────────── */
.wdg-upcoming {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.wdg-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.wdg-upcoming-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 26px;
    transition: border-color 0.3s, transform 0.2s;
    position: relative;
}

.wdg-upcoming-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.wdg-upcoming-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.wdg-upcoming-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-dim);
}

.wdg-upcoming-card h3 {
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    margin-bottom: 8px;
}

.wdg-upcoming-card p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 14px;
}

.wdg-badge-soon {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255,152,0,0.1);
    color: #ff9800;
    border: 1px solid rgba(255,152,0,0.2);
}

/* ─── Active nav ─────────────────────────────────── */
.nav-links a.active {
    color: var(--orange);
    font-weight: 600;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1000px) {
    .wdg-detail-body {
        flex-direction: column;
    }
    .wdg-detail-demo {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 600px) {
    .wdg-features-grid {
        grid-template-columns: 1fr;
    }
    .wdg-demo-bar {
        flex-direction: column;
        gap: 8px;
    }
    .wdg-hero {
        padding: 100px 20px 40px;
    }
    .wdg-detail {
        padding: 20px 20px 40px;
    }
}
