/* Homepage hero concierge widget.
   Deliberately its own stylesheet rather than reusing site_concierge.css: that
   widget is still on the old hardcoded-dark palette (#0a0f1c etc.) predating
   edu-theme.css's light "chalk" rebrand, and dropping it into the hero as-is
   would clash with the rest of the page. This one uses the same theme tokens
   as edu-theme.css so the hero and the rest of the homepage read as one page. */

.hero-concierge-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-intro { min-width: 0; }

@media (max-width: 900px) {
    .hero-concierge-layout {
        grid-template-columns: 1fr;
    }
}

.concierge-hero {
    /* Frosted glass, not an opaque card — sits on the chalk-mesh hero the same
       way .navbar does, so the panel reads as part of the hero rather than a
       widget dropped on top of it. */
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--glass-shadow, 0 12px 28px -16px rgba(20, 30, 60, 0.15));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.concierge-hero-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 0;
}

.concierge-hero-mark {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 4px 12px -4px rgba(150, 48, 95, 0.55);
    flex-shrink: 0;
}

.concierge-hero-label {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.concierge-hero-messages {
    flex: 0 1 auto;
    overflow-y: auto;
    max-height: 260px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.concierge-hero-msg { display: flex; }
.concierge-hero-msg.user { justify-content: flex-end; }

.concierge-hero-bubble {
    /* Opaque "paper" floating on the glass panel, not another translucent
       layer — keeps the text legible and gives the thread real depth. */
    background: var(--secondary-dark);
    box-shadow: 0 2px 10px -6px rgba(20, 30, 60, 0.2);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
    max-width: 88%;
    font-size: 0.92rem;
    /* A drafted lesson plan (generate_lesson_plan) lands in this same bubble as
       plain text with real line breaks (Hook / Instruction / Practice sections)
       — without this, CSS's default `normal` collapses them into one run-on
       paragraph. Still wraps long lines normally, unlike `pre`. */
    white-space: pre-wrap;
}

.concierge-hero-msg.user .concierge-hero-bubble {
    background: var(--accent-blue);
    color: #fff;
}

.concierge-hero-typing {
    display: flex;
    gap: 4px;
    padding: 4px 2px;
}

.concierge-hero-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted, var(--text-secondary));
    animation: concierge-hero-blink 1.2s infinite ease-in-out;
}

.concierge-hero-typing span:nth-child(2) { animation-delay: 0.2s; }
.concierge-hero-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes concierge-hero-blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.concierge-hero-error {
    background: rgba(163, 31, 52, 0.1);
    border: 1px solid rgba(163, 31, 52, 0.35);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.concierge-hero-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 20px 14px;
}

.concierge-hero-starters[hidden] { display: none; }

.concierge-hero-chip {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 7px 14px;
    font-family: inherit;
    font-size: 0.83rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.concierge-hero-chip:hover {
    background: #fff;
    border-color: var(--accent-blue);
    color: var(--accent-deep);
}

.concierge-hero-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px 12px;
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid var(--hairline);
    padding-top: 12px;
}

.concierge-hero-card {
    display: block;
    background: var(--secondary-dark);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.concierge-hero-card:hover { border-color: var(--accent-blue); }

.concierge-hero-card .card-eyebrow {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--accent-deep);
}

.concierge-hero-card h4 {
    font-size: 0.88rem;
    color: var(--text-primary);
    margin: 2px 0 0;
}

.concierge-hero-form {
    display: flex;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--hairline);
}

.concierge-hero-input {
    flex: 1;
    background: var(--primary-dark);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 0.92rem;
    font-family: inherit;
}

.concierge-hero-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.concierge-hero-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
