/* ============================================
   Interactive Demos — Agency version
   Master Dashboard + Mini Menu Editor
   ============================================ */

/* ============================================
   DEMOS SECTION — cream bg
   ============================================ */
.section-demos {
    padding: var(--section-padding) 0;
    background: var(--cream);
}

.demos-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}

.demos-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: start;
}

/* ============================================
   SHARED BROWSER FRAME
   ============================================ */
.demo-frame {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.demo-frame-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--cream);
    border-bottom: 1px solid var(--border-light);
}

.demo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.demo-dot:nth-child(1) { background: #FF5F57; }
.demo-dot:nth-child(2) { background: #FEBC2E; }
.demo-dot:nth-child(3) { background: #28C840; }

.demo-url {
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   MASTER DASHBOARD DEMO
   ============================================ */
.dashboard-demo {
    position: relative;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.dashboard-header-agency {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Stats row ── */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--cream);
    border-radius: var(--radius);
}

.dashboard-stat-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--plum);
    line-height: 1;
    margin-bottom: 4px;
}

.dashboard-stat-number.stat-green { color: var(--green); }
.dashboard-stat-number.stat-amber { color: var(--amber); }
.dashboard-stat-number.stat-blue { color: var(--blue); }

.dashboard-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── License list ── */
.dashboard-licenses {
    padding: 16px 24px;
    max-height: 340px;
    overflow-y: auto;
}

.dashboard-licenses::-webkit-scrollbar { width: 4px; }
.dashboard-licenses::-webkit-scrollbar-track { background: transparent; }
.dashboard-licenses::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

.license-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--white);
}

.license-card:hover {
    border-color: var(--plum);
    box-shadow: var(--shadow-sm);
}

.license-card:last-child {
    margin-bottom: 0;
}

.license-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.license-status-dot.active { background: var(--green); }
.license-status-dot.expiring { background: var(--amber); }
.license-status-dot.expired { background: var(--red); }
.license-status-dot.pending { background: var(--text-muted); }

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

.license-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.license-domain {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.license-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.license-feature-tag {
    padding: 3px 10px;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.license-feature-tag.tag-menu { background: var(--lavender-soft); color: rgb(120, 120, 220); }
.license-feature-tag.tag-booking { background: var(--green-soft); color: var(--green); }
.license-feature-tag.tag-full { background: var(--plum); color: var(--lime); }

.license-status-badge {
    padding: 3px 10px;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.license-status-badge.badge-active { background: var(--green-soft); color: var(--green); }
.license-status-badge.badge-expiring { background: var(--amber-soft); color: var(--amber); }
.license-status-badge.badge-expired { background: var(--red-soft); color: var(--red); }
.license-status-badge.badge-pending { background: var(--cream); color: var(--text-muted); }

/* ── Generate button ── */
.dashboard-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

.dashboard-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--plum);
    color: var(--text-on-dark);
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.dashboard-generate-btn:hover {
    background: var(--plum-soft);
    transform: translateY(-1px);
}

/* ── Dashboard toast ── */
.dashboard-toast {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 24px;
    background: var(--plum);
    color: var(--text-on-dark);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.dashboard-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   MINI MENU EDITOR DEMO
   ============================================ */
.mini-editor-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 12px;
}

.mini-editor-content {
    padding: 16px;
    max-height: 460px;
    overflow-y: auto;
}

.mini-editor-content::-webkit-scrollbar { width: 4px; }
.mini-editor-content::-webkit-scrollbar-track { background: transparent; }
.mini-editor-content::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

.mini-category-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.mini-dish {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mini-dish:hover {
    background: var(--cream);
    border-color: var(--border-light);
}

.mini-dish.editing {
    border-color: var(--plum);
    background: rgba(26, 15, 31, 0.03);
}

.mini-dish-info {
    flex: 1;
    min-width: 0;
}

.mini-dish-name {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-dark);
    outline: none;
    display: block;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.3s ease;
}

.mini-dish.editing .mini-dish-name {
    border-bottom-color: var(--plum);
}

.mini-dish-badges {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 7px;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.mini-badge-veg { background: var(--green-soft); color: var(--green); }
.mini-badge-spicy { background: var(--red-soft); color: var(--red); }
.mini-badge-chef { background: var(--amber-soft); color: var(--amber); }
.mini-badge-gf { background: var(--blue-soft); color: var(--blue); }

.mini-badge.inactive { opacity: 0.25; }
.mini-badge:hover { transform: scale(1.06); }

.mini-dish-allergens {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.mini-allergen {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 800;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.mini-allergen.on {
    background: var(--plum);
    color: var(--text-on-dark);
}

.mini-allergen.off {
    background: var(--cream);
    color: var(--text-muted);
    opacity: 0.4;
}

.mini-allergen:hover {
    transform: scale(1.15);
}

.mini-dish-price {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--plum);
    outline: none;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.3s ease;
    min-width: 48px;
    text-align: right;
    flex-shrink: 0;
}

.mini-dish.editing .mini-dish-price {
    border-bottom-color: var(--plum);
}

/* ── Mini editor bottom bar ── */
.mini-editor-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--cream);
    border-top: 1px solid var(--border-light);
}

.mini-bottombar-left {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mini-bottombar-actions {
    display: flex;
    gap: 6px;
}

.mini-bottombar-btn {
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.mini-bottombar-btn-ghost {
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    background: var(--white);
}

.mini-bottombar-btn-ghost:hover {
    border-color: var(--plum);
    color: var(--plum);
}

.mini-bottombar-btn-accent {
    background: var(--plum);
    color: var(--text-on-dark);
    border: 1px solid var(--plum);
}

.mini-bottombar-btn-accent:hover {
    background: var(--plum-soft);
}

/* ── Mini editor toast ── */
.mini-editor-toast {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 8px 20px;
    background: var(--plum);
    color: var(--text-on-dark);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.mini-editor-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .demos-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .license-meta {
        flex-direction: column;
        gap: 4px;
    }
}
