/* ──────────────────────────────────────────────────────────────────
   Polish fix — Chat fullscreen overlay + header-integrated button
   Spec: docs/superpowers/specs/2026-05-11-track-c3-bottom-nav-design.md
   Replaces the original slide-up panel with a true fullscreen modal.
   Bubble button lives inside the OV header (not floating) — see
   index.html for the markup.
   ────────────────────────────────────────────────────────────────── */

/* Reset legacy floating .chat-bubble rules — bubble is now a normal
   .ov-icon-btn inside the header; remove the old fixed-position styles
   that the previous markup relied on. */
.chat-bubble {
    /* No special positioning; styled by .ov-icon-btn in obsidian-vault.css */
}

/* The unread badge on the chat-bubble. Uses #chat-bubble-badge id with
   .ov-badge class — same visual as notif-badge. No extra rules needed,
   .ov-badge styles cover it. */

/* ─ Backdrop ──────────────────────────────────────────────────── */
.chat-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9989;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}
.chat-panel-backdrop[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
}

/* ─ Panel — FULLSCREEN ─────────────────────────────────────────── */
.chat-panel {
    position: fixed;
    inset: 0;
    background: var(--surface);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateY(100%);
    transition: transform 320ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
.chat-panel[data-open="true"] {
    transform: translateY(0);
}
.chat-panel[hidden] {
    display: flex;  /* CSS-driven open/close; ignore native hidden so we can animate */
}

/* Drag handle is small visual cue at top — keep for swipe-down */
.chat-panel__drag-handle {
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    background: var(--muted);
    border-radius: 2px;
    opacity: 0.4;
    flex-shrink: 0;
}

.chat-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.chat-panel__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}
.chat-panel__close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    line-height: 0;
    border-radius: 99px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 180ms ease, border-color 180ms ease;
}
.chat-panel__close svg {
    width: 18px;
    height: 18px;
}
@media (hover: hover) {
    .chat-panel__close:hover {
        color: var(--text);
        border-color: var(--muted);
    }
}

.chat-panel__content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Migrated chat-main needs to fit inside the fullscreen panel.
   The selector is bumped to body.ov #chat-panel-content because
   obsidian-vault.css redefines `body.ov .ov-chat .max-w-4xl`
   (specificity 0,3,1) which would otherwise win against a
   plain `.chat-panel__content .ov-chat-main` rule (0,2,0).
   We also explicitly neutralize the Tailwind centering classes
   (`max-w-4xl`, `mx-auto`) when they appear on .ov-chat-main
   inside the chat panel, so chat actually fills the viewport. */
body.ov #chat-panel-content.chat-panel__content .ov-chat-main,
body.ov #chat-panel-content.chat-panel__content .ov-chat-main.max-w-4xl {
    height: 100%;
    max-width: none;
    padding: 0 12px;
    margin: 0;
}

/* ─ Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .chat-panel { transition: none; }
    .chat-panel-backdrop { transition: none; }
}
