/* ============================================================================
   FinRiskLens AI Product Guide (Views/Home/_ProductGuide.cshtml).
   Builds on Chatbot.css (panel, header, messages, input, Markdown); this file adds
   the home page parts: launcher, welcome card, starter topics, feature and analysis cards,
   follow-up chips and the assessment call to action.
   ========================================================================== */

/* The panel starts below the site header, so the Sign In menu stays reachable */
.frl-guide .frl-chat-panel { top: 72px; }
.frl-guide.expanded .frl-chat-panel { top: 72px; bottom: 3vh; }

/* ── Launcher: "Your AI Credit Guide" pill with the theme's robot ────── */
.frl-guide { bottom: 20px; }
.frl-guide .frl-chat-launcher.frl-guide-launcher {
    width: auto; height: auto;
    gap: 12px;
    padding: 6px 20px 6px 6px;
    background: #fff;
    border: 1px solid var(--frl-border);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(var(--brand-primary-rgb), .22), 0 2px 6px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.frl-guide .frl-guide-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(var(--brand-primary-rgb), .30), 0 2px 6px rgba(0, 0, 0, .06);
}
.frl-guide .frl-guide-launcher:focus-visible { outline: 3px solid var(--frl-maroon); outline-offset: 3px; border-radius: 999px; }

.frl-guide-avatar { position: relative; flex: none; width: 56px; height: 56px; }
/* A slow burgundy "breathing" ring behind the avatar */
.frl-guide-avatar::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), .35);
    animation: frl-guide-glow 3s ease-out infinite;
}
.frl-guide-face {
    position: relative; display: block; width: 100%; height: 100%;
    border-radius: 50%; overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #fff 0%, var(--frl-maroon-soft) 100%);
    border: 1px solid var(--frl-border);
}
/* The GIFs are wider than tall with the robot left of centre (about 38% across, 60% down):
   put that point at the middle of the circle */
.frl-guide-face .frl-chat-launcher-img {
    position: absolute; left: 50%; top: 50%; width: 128%; height: auto; max-width: none;
    transform: translate(-38%, -58%);
}
.frl-guide-face .frl-chat-launcher-img.frl-bot-theme2 { width: 141%; }   /* same 10% size match as Chatbot.css */
.frl-guide-online {
    position: absolute; right: 1px; bottom: 2px; width: 13px; height: 13px; border-radius: 50%;
    background: #22c55e; border: 2px solid #fff;
}
.frl-guide-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.frl-guide-label strong { font-size: .92rem; font-weight: 700; color: var(--brand-primary-dark); white-space: nowrap; }
.frl-guide-label small { font-size: .74rem; color: #6b6b6b; white-space: nowrap; margin-top: 2px; }
@keyframes frl-guide-glow {
    0% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), .35); }
    70%, 100% { box-shadow: 0 0 0 12px rgba(var(--brand-primary-rgb), 0); }
}

/* Header avatar: the same robot in a white circle */
.frl-guide-head-avatar { background: #fff; padding: 0; overflow: hidden; }
.frl-guide-head-avatar .frl-guide-face { border: 0; }
.frl-guide-brand { opacity: .8; }

/* ── Welcome card ────────────────────────────────────────────────────── */
.frl-guide-hero {
    background: linear-gradient(160deg, #fff 0%, var(--frl-maroon-soft) 100%);
    border: 1px solid var(--frl-border); border-radius: 16px; padding: 18px;
}
.frl-guide-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--frl-maroon); background: #fff; border: 1px solid var(--frl-border); border-radius: 999px; padding: 3px 10px;
}
.frl-guide-hero h3 { font-size: 1.15rem; font-weight: 800; color: var(--brand-primary-dark); margin: 12px 0 6px; line-height: 1.25; }
.frl-guide-hero p { font-size: .88rem; color: #4a4a4a; line-height: 1.55; margin: 0 0 14px; }
.frl-guide-questions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.frl-guide-question {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; text-align: left; font-size: .86rem; font-weight: 600; color: #2b2b2b;
    background: #fff; border: 1px solid var(--frl-border); border-radius: 12px; padding: 10px 14px;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.frl-guide-question i { color: var(--frl-maroon); transition: transform .15s ease; flex: none; }
.frl-guide-question:hover:not(:disabled), .frl-guide-question:focus-visible {
    border-color: var(--frl-maroon); outline: none; box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb), .10);
}
.frl-guide-question:hover:not(:disabled) i { transform: translateX(3px); }
.frl-guide-question:disabled { opacity: .55; }
.frl-guide-hero-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px 16px; border-radius: 12px; text-decoration: none;
    font-weight: 700; font-size: .92rem; color: #fff;
    background: linear-gradient(120deg, var(--brand-primary-dark) 0%, var(--frl-maroon) 100%);
    box-shadow: 0 8px 20px rgba(var(--brand-primary-rgb), .25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.frl-guide-hero-cta:hover, .frl-guide-hero-cta:focus-visible {
    color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(var(--brand-primary-rgb), .32); outline: none;
}
.frl-guide-topics-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-secondary); margin: 14px 0 8px; }
.frl-guide-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Answers ─────────────────────────────────────────────────────────── */
.frl-guide .frl-msg-bot { min-width: 0; }
.frl-guide-welcome-text { margin: 0 0 12px; }
.frl-guide-fallback { border-left: 3px solid #e0a800; }
.frl-guide-hidden-msg { font-style: italic; opacity: .85; }

/* Starter topics */
.frl-guide-starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.frl-guide-starter {
    display: flex; align-items: center; gap: 8px;
    text-align: left; font-size: .84rem; font-weight: 600; line-height: 1.3;
    color: var(--brand-primary-dark); background: var(--frl-maroon-soft);
    border: 1px solid var(--frl-border); border-radius: 12px; padding: 9px 12px;
    transition: border-color .15s ease, transform .15s ease;
}
.frl-guide-starter i { color: var(--frl-maroon); font-size: 1rem; flex: none; }
.frl-guide-starter:hover:not(:disabled), .frl-guide-starter:focus-visible { border-color: var(--frl-maroon); transform: translateY(-1px); outline: none; }
.frl-guide-starter:disabled { opacity: .55; }

/* Feature cards */
.frl-guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.frl-guide-card {
    display: flex; flex-direction: column; gap: 6px;
    background: #fff; border: 1px solid var(--frl-border); border-radius: 12px; padding: 12px 14px;
}
.frl-guide-card-head { display: flex; align-items: flex-start; gap: 8px; }
.frl-guide-card-head i { color: var(--frl-maroon); font-size: 1.05rem; margin-top: 1px; }
.frl-guide-card-title { font-weight: 700; font-size: .88rem; color: var(--brand-primary-dark); line-height: 1.3; }
.frl-guide-card-text { margin: 0; font-size: .83rem; line-height: 1.55; color: #444; flex: 1; }
.frl-guide-tag {
    align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: var(--brand-secondary); background: var(--frl-maroon-soft); border-radius: 999px; padding: 2px 8px;
}

/* Types of Analysis: one accordion per analysis */
.frl-guide-analysis { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.frl-guide-acc { border: 1px solid var(--frl-border); border-radius: 12px; background: #fff; overflow: hidden; }
.frl-guide-acc summary {
    display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
    padding: 10px 14px; font-weight: 700; font-size: .88rem; color: var(--brand-primary-dark);
}
.frl-guide-acc summary::-webkit-details-marker { display: none; }
.frl-guide-acc summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; transition: transform .2s ease; color: var(--frl-maroon); }
.frl-guide-acc[open] summary::after { transform: rotate(180deg); }
.frl-guide-acc summary i { color: var(--frl-maroon); }
.frl-guide-acc summary:focus-visible { outline: 2px solid var(--frl-maroon); outline-offset: -2px; }
.frl-guide-acc[open] summary { background: var(--frl-maroon-soft); border-bottom: 1px solid var(--frl-border); }
.frl-guide-acc dl { margin: 0; padding: 10px 14px 12px; display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 6px 14px; }
.frl-guide-acc dt { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand-secondary); padding-top: 2px; }
.frl-guide-acc dd { margin: 0; font-size: .84rem; line-height: 1.5; color: #333; }

/* Call to action */
.frl-guide-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 14px; padding: 12px 14px; border-radius: 12px;
    background: linear-gradient(120deg, var(--brand-primary-dark) 0%, var(--frl-maroon) 100%); color: #fff;
}
.frl-guide-cta span { font-weight: 600; font-size: .88rem; }
.frl-guide-cta-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: var(--brand-primary-dark); font-weight: 700; font-size: .84rem;
    border-radius: 10px; padding: 7px 14px; text-decoration: none;
}
.frl-guide-cta-btn:hover, .frl-guide-cta-btn:focus-visible { color: var(--frl-maroon); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); outline: none; }

/* Follow-up chips, directly under the latest answer */
.frl-guide-next { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--frl-border); }
.frl-guide-chip {
    border: 1px solid var(--frl-border); background: var(--frl-maroon-soft); color: var(--brand-primary-dark);
    border-radius: 999px; padding: 5px 12px; font-size: .8rem; text-align: left; line-height: 1.35;
}
.frl-guide-chip:hover:not(:disabled), .frl-guide-chip:focus-visible { border-color: var(--frl-maroon); outline: none; }
.frl-guide-chip:disabled { opacity: .55; }
.frl-guide-chip-ghost { background: #fff; color: var(--brand-secondary); }

/* ── Expanded: more reading room ─────────────────────────────────────── */
.frl-guide.expanded .frl-msg { font-size: .95rem; line-height: 1.7; }
.frl-guide.expanded .frl-guide-card-text,
.frl-guide.expanded .frl-guide-acc dd { font-size: .9rem; }
.frl-guide.expanded .frl-guide-starters { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* ── Phones: Chatbot.css makes the panel full screen ─────────────────── */
@media (max-width: 767.98px) {
    .frl-guide .frl-chat-panel,
    .frl-guide.expanded .frl-chat-panel { top: 0; }
    .frl-guide { right: 14px; bottom: 14px; }
    .frl-guide .frl-chat-launcher.frl-guide-launcher { padding: 4px; }
    .frl-guide-label { display: none; }
    .frl-guide-starters { grid-template-columns: 1fr 1fr; }
    .frl-guide-acc dl { grid-template-columns: 1fr; gap: 2px; }
    .frl-guide-acc dd { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .frl-guide-starter, .frl-guide-acc summary::after, .frl-guide-launcher, .frl-guide-question, .frl-guide-hero-cta { transition: none; }
    .frl-guide-avatar::before { animation: none; }
}
