/* Ask the Guide — shared chat styles (loaded by index.html AND field-guide.html).
   Extracted from index.css 2026-07-08 so both pages share one copy. Uses
   tokens.css variables — link tokens.css before this file. */

/* ── Ask the Guide ────────────────────────────────────────────── */
.ask-guide-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 12px 0;
    padding: 12px 16px;
    border: 1px solid var(--forest-200);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--forest-50), var(--gold-50));
    color: var(--forest-700);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: box-shadow .15s ease, transform .05s ease;
}
.ask-guide-bar:hover { box-shadow: var(--card-shadow-hover); }
.ask-guide-bar:active { transform: scale(0.995); }
.ask-guide-spark { font-size: 1.1rem; flex-shrink: 0; }
.ask-guide-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.guide-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
}
.guide-chat-overlay.active { display: flex; }
.guide-chat-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    height: 100%;
    max-height: 720px;
    background: var(--sand-50);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
}
.guide-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--forest-700);
    color: #fff;
}
.guide-chat-title { font-family: var(--font-display); font-size: 1.1rem; }
.guide-chat-close {
    background: none; border: none; color: #fff;
    font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px;
}
.guide-chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.guide-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.45;
    word-wrap: break-word;
}
.guide-msg p { margin: 0 0 8px 0; }
.guide-msg p:last-child { margin-bottom: 0; }
.guide-msg-user {
    align-self: flex-end;
    background: var(--forest-600);
    color: #fff;
}
.guide-msg-ai {
    align-self: flex-start;
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--sand-300);
}
.guide-typing { display: flex; gap: 4px; align-items: center; }
.guide-typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--forest-300);
    animation: guideBlink 1.2s infinite ease-in-out both;
}
.guide-typing span:nth-child(2) { animation-delay: .2s; }
.guide-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes guideBlink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.guide-empty-state { margin: auto 0; text-align: center; padding: 12px; }
.guide-empty-lead { color: var(--text-secondary); font-size: 0.95rem; margin: 0 0 16px 0; }

/* ── Start chooser: chat without media vs identify a photo ────── */
.guide-start-lead {
    font-family: var(--font-display);
    color: var(--forest-800);
    font-size: 1.2rem;
    margin: 0 0 18px 0;
}
.guide-start-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}
.guide-start-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius-lg);
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.guide-start-card:hover {
    border-color: var(--forest-300);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}
.guide-start-card:active { transform: translateY(0); }
.guide-start-card:focus-visible { outline: 2px solid var(--forest-400); outline-offset: 2px; }
.guide-start-card-photo {
    background: linear-gradient(135deg, var(--gold-50), var(--forest-50));
    border-color: var(--gold-200);
}
.guide-start-card-photo:hover { border-color: var(--gold-400); }
.guide-start-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--forest-100);
    font-size: 1.3rem;
    margin-bottom: 6px;
}
.guide-start-card-photo .guide-start-icon { background: var(--gold-100); }
.guide-start-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--forest-800);
}
.guide-start-sub {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}
@media (prefers-reduced-motion: reduce) {
    .guide-start-card, .guide-start-card:hover, .guide-start-card:active { transform: none; transition: none; }
}
@media (max-width: 480px) {
    .guide-start-options { grid-template-columns: 1fr; max-width: 320px; }
    .guide-start-card {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 12px;
        row-gap: 2px;
        align-items: center;
    }
    .guide-start-icon { grid-row: 1 / span 2; margin-bottom: 0; }
}
.guide-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.guide-chip {
    padding: 8px 14px;
    border: 1px solid var(--forest-200);
    border-radius: 999px;
    background: var(--forest-50);
    color: var(--forest-700);
    font-size: 0.85rem;
    cursor: pointer;
}
.guide-chip:hover { background: var(--forest-100); }

.guide-cards-row {
    align-self: flex-start;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 6px 2px;
    max-width: 100%;
}
.guide-card {
    flex: 0 0 148px;
    width: 148px;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}
.guide-card-thumb { width: 100%; height: 100px; object-fit: cover; display: block; background: var(--bg-tertiary); }
.guide-card-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.guide-card-name { font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.guide-card-secondary { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.guide-card-seen {
    margin-top: 2px; font-size: 0.7rem; font-weight: 600;
    color: var(--conf-high);
}

.guide-comparison {
    align-self: flex-start;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius-md);
    padding: 12px;
}
.guide-comparison-pair { display: flex; gap: 10px; }
.guide-comparison-bullets { margin: 12px 0 0 0; padding-left: 18px; font-size: 0.88rem; line-height: 1.5; }
.guide-comparison-bullets li { margin-bottom: 4px; }

.guide-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px calc(12px + var(--safe-area-inset-bottom)) 14px;
    border-top: 1px solid var(--sand-300);
    background: var(--sand-100);
}
.guide-chat-input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--sand-300);
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
}
.guide-chat-input:focus { border-color: var(--forest-400); }
.guide-chat-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 13px;
    border: 1px solid var(--forest-300);
    border-radius: 999px;
    background: var(--forest-50);
    color: var(--forest-700);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.guide-chat-photo:hover { background: var(--forest-100); }
.guide-chat-photo:focus-visible { outline: 2px solid var(--forest-400); outline-offset: 2px; }
.guide-chat-send {
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--forest-600);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.guide-chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 600px) {
    .guide-chat-overlay { align-items: stretch; justify-content: stretch; }
    .guide-chat-panel { max-width: none; max-height: none; border-radius: 0; }
    .guide-chat-photo { width: 44px; padding: 0; }
    .guide-chat-photo-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}
