/* ============================================
   Editor Demo + Booking Demo
   Premium editorial, bottom toolbar
   ============================================ */

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

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

.editor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Feature list (desktop) ── */
.editor-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 100px;
}

.editor-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-feature:hover {
    background: var(--white);
    border-color: var(--border-light);
}

.editor-feature.active {
    background: var(--white);
    border-color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.editor-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-warm);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.editor-feature.active .editor-feature-icon {
    background: var(--ink);
}

.editor-feature-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.editor-feature.active .editor-feature-text h4 {
    color: var(--ink);
}

.editor-feature-text p {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Mobile accordion ── */
.editor-feature-desc-mobile {
    display: none;
}

/* ── Demo panel ── */
.editor-demo {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    text-align: left; /* never inherit center from dark demo section */
}

.editor-demo-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;
}

/* ── Demo content ── */
.editor-demo-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

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

.demo-category {
    margin-bottom: 22px;
}

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

/* ── Dish row ── */
.demo-dish {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.demo-dish.editing {
    border-color: var(--terracotta);
    background: var(--terracotta-soft);
    box-shadow: 0 0 0 3px var(--terracotta-soft);
}

.demo-dish.highlight-edit {
    border-color: var(--terracotta);
    background: var(--terracotta-soft);
}

/* ── Reorder arrows — ALWAYS VISIBLE on desktop ── */
.demo-dish-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    align-self: center;
}

.arrow-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 0.65rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.arrow-btn:hover {
    background: var(--ink);
    color: var(--text-on-dark);
    border-color: var(--ink);
}

.arrow-btn.highlight {
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
    animation: arrowPulse 0.7s ease infinite alternate;
}

@keyframes arrowPulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* ── Dish info ── */
.demo-dish-info {
    flex: 1;
    min-width: 0;
}

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

.demo-dish.editing .demo-dish-name {
    border-bottom-color: var(--terracotta);
}

.demo-dish-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Badges ── */
.demo-dish-badges {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    font-size: 0.66rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

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

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

.demo-badge.highlight {
    animation: badgePulse 0.7s ease infinite alternate;
}

@keyframes badgePulse {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

/* ── Allergens ── */
.demo-dish-allergens {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.demo-allergen {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.demo-allergen svg {
    width: 14px;
    height: 14px;
}

.demo-allergen.on {
    background: var(--terracotta);
    color: #fff;
}

.demo-allergen.off {
    background: var(--cream-warm);
    color: var(--text-muted);
    opacity: 0.55;
}

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

.demo-allergen.highlight {
    animation: allergenPulse 0.6s ease infinite alternate;
    box-shadow: 0 0 8px rgba(26, 15, 31, 0.2);
}

@keyframes allergenPulse {
    from { transform: scale(1); }
    to { transform: scale(1.18); box-shadow: 0 0 12px rgba(26, 15, 31, 0.3); }
}

/* ── Price ── */
.demo-dish-price {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--terracotta);
    outline: none;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.3s ease;
    min-width: 55px;
    text-align: right;
    flex-shrink: 0;
    align-self: center;
}

.demo-dish.editing .demo-dish-price {
    border-bottom-color: var(--terracotta);
}

/* ============================================
   BOTTOM TOOLBAR
   ============================================ */
.editor-demo-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--cream);
    border-top: 1px solid var(--border-light);
}

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

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

.bottombar-btn {
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: all 0.25s ease;
    cursor: pointer;
}

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

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

.bottombar-btn-accent {
    background: var(--terracotta);
    color: var(--white);
    border: 1px solid var(--terracotta);
}

.bottombar-btn-accent:hover {
    background: var(--terracotta-hover);
}

.bottombar-btn.highlight {
    animation: btnHighlight 0.6s ease infinite alternate;
    box-shadow: 0 0 12px var(--terracotta-glow);
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

@keyframes btnHighlight {
    from { transform: scale(1); box-shadow: 0 0 8px var(--terracotta-glow); }
    to { transform: scale(1.04); box-shadow: 0 0 18px var(--terracotta-glow); }
}

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

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

/* ============================================
   BOOKING SECTION — white bg
   ============================================ */
.section-booking {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.booking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.booking-text {
    padding-top: 16px;
}

.booking-text .section-body {
    margin-bottom: 32px;
}

.booking-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booking-feat {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.booking-feat:hover {
    background: var(--cream);
    border-color: var(--border-light);
}

.booking-feat-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.booking-feat-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.booking-feat-text p {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Booking Demo ── */
.booking-demo {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

.booking-demo-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.booking-demo-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.booking-steps {
    display: flex;
    gap: 4px;
}

.booking-step {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--cream-dark);
    transition: background 0.4s ease;
}

.booking-step.active { background: var(--ink); }
.booking-step.completed { background: var(--terracotta); }

.booking-demo-body {
    padding: 24px;
    min-height: 320px;
    position: relative;
}

.booking-form-step { display: none; }
.booking-form-step.active {
    display: block;
    animation: slideIn 0.35s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── Form elements ── */
.form-row { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(26, 15, 31, 0.06);
}

.form-input::placeholder { color: var(--text-muted); }

.people-counter {
    display: flex;
    align-items: center;
    gap: 16px;
}

.people-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.people-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.people-count {
    font-size: 1.15rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.slot-btn {
    padding: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.slot-btn.available {
    background: var(--green-soft);
    color: var(--green);
}

.slot-btn.available:hover {
    border-color: var(--green);
}

.slot-btn.selected {
    background: var(--ink);
    color: var(--text-on-dark);
}

.slot-btn.busy {
    background: var(--cream);
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}

.booking-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.booking-nav-btn {
    flex: 1;
    padding: 12px;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.booking-nav-btn.next {
    background: var(--ink);
    color: var(--text-on-dark);
}

.booking-nav-btn.next:hover {
    background: var(--ink-soft);
}

.booking-nav-btn.back {
    background: var(--cream);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.booking-nav-btn.back:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* ── Confirmation ── */
.booking-confirmation {
    text-align: center;
    padding: 20px 0;
}

.booking-confirmation-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--green-soft);
    color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.booking-confirmation h4 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.booking-confirmation p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.booking-summary {
    margin-top: 20px;
    padding: 16px;
    background: var(--cream);
    border-radius: var(--radius);
    text-align: left;
}

.booking-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.84rem;
}

.booking-summary-label { color: var(--text-muted); }
.booking-summary-value { font-weight: 700; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    /* Editor: single column on mobile */
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .editor-features {
        position: static;
        flex-direction: column;
        gap: 0;
    }

    .editor-feature {
        flex-wrap: wrap;
        padding: 16px;
        border-bottom: 1px solid var(--border-light);
        border-radius: 0;
    }

    .editor-feature:first-child {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .editor-feature:last-child {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        border-bottom: none;
    }

    .editor-feature-text p {
        display: none;
    }

    .editor-feature.active .editor-feature-text p,
    .editor-feature.expanded .editor-feature-text p {
        display: block;
        margin-top: 4px;
    }
}
