/* =====================================================
   HONESTLY, E — Cookbook Panel (Ember Hospitality Companion)
   Ember's right-column shell — replaces timeline when Ember
   is the active companion. Mirrors the Storylines (Emory)
   and Voyages (Esmé) pattern: an always-present aside that
   shows the wake of the subscriber's hospitality stewardship
   (recipes + menus). The existing #modal-cookbook stays as
   the editor — the right-column panel is the visible surface.

   Per the companion-surface-awareness principle: this is
   piece 1 of 4 (UI). Tools, constitution awareness, and
   memoryContext summary land in subsequent Vapi-side work.
   ===================================================== */

/* -----------------------------------------------------
   Panel container — shown only when .ember-active on body
   ----------------------------------------------------- */
.cookbook-panel {
    display: none;
    width: var(--timeline-width, 280px);
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow: hidden;
}

.ember-active .cookbook-panel {
    display: flex;
}

.ember-active .timeline-sidebar {
    display: none;
}

.ember-active .timeline-fab {
    display: none !important;
}

/* -----------------------------------------------------
   Header
   ----------------------------------------------------- */
.cookbook-panel-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookbook-panel-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
}

.cookbook-panel-edit-btn {
    background: none;
    border: 1px solid var(--ember-color, #C26840);
    color: var(--ember-color, #C26840);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookbook-panel-edit-btn:hover {
    background: var(--ember-color, #C26840);
    color: white;
}

/* -----------------------------------------------------
   Tabs — Recipes | Menus
   ----------------------------------------------------- */
.cookbook-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.cookbook-panel-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.7rem 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.cookbook-panel-tab:hover {
    color: var(--text-secondary);
}

.cookbook-panel-tab.active {
    color: var(--ember-color, #C26840);
    border-bottom-color: var(--ember-color, #C26840);
}

/* -----------------------------------------------------
   Scroll area + lists
   ----------------------------------------------------- */
.cookbook-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
}

.cookbook-panel-list {
    flex: 1;
}

.cookbook-panel-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.cookbook-panel-empty-icon {
    font-size: 1.6rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.cookbook-panel-empty-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.cookbook-panel-empty-text {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.cookbook-panel-empty-cta {
    margin-top: 0.85rem;
    background: var(--ember-color, #C26840);
    color: white;
    border: none;
    padding: 0.45rem 0.95rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookbook-panel-empty-cta:hover {
    background: #A8522F;
}

/* -----------------------------------------------------
   Recipe / Menu cards
   ----------------------------------------------------- */
.cookbook-panel-item {
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    margin-bottom: 0.45rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookbook-panel-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.cookbook-panel-item-title {
    font-family: var(--font-serif);
    font-size: 0.93rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.cookbook-panel-item-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-style: italic;
}

.cookbook-panel-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-family: var(--font-sans);
}

/* -----------------------------------------------------
   Compose footer
   ----------------------------------------------------- */
.cookbook-panel-footer {
    padding: 0.85rem;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.cookbook-panel-compose-btn {
    width: 100%;
    background: var(--bg-card);
    color: var(--ember-color, #C26840);
    border: 1px solid var(--ember-color, #C26840);
    padding: 0.55rem 0.95rem;
    font-family: var(--font-serif);
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookbook-panel-compose-btn:hover {
    background: var(--ember-color, #C26840);
    color: white;
}

.cookbook-panel-compose-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* -----------------------------------------------------
   Responsive — collapse panel on mobile (Ember falls back
   to timeline-style modal / FAB pattern that other shells use)
   ----------------------------------------------------- */
@media (max-width: 1024px) {
    .ember-active .cookbook-panel {
        display: none;
    }
    .ember-active .timeline-sidebar {
        display: flex;
    }
}
