/* ============================================================
   THE FERTILITY CO-LIVING — Application additions
   Styles for dynamic pieces added on top of the original
   template stylesheet (styles.css is kept untouched).
   ============================================================ */

/* ---------- Assessment additions ---------- */

.option-btn:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

label.option-btn {
    cursor: pointer;
    margin: 0;
}

.scale-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 90px));
}

.scale-btn {
    min-height: 64px;
    padding: 1rem .5rem;
    font-weight: 600;
}

.assessment-select {
    background-color: var(--pill);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: .9rem 1rem;
}

.assessment-select:focus {
    background-color: #fff;
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(46, 115, 119, .15);
}

.skip-link {
    color: var(--muted);
    font-size: .9rem;
    text-decoration: underline;
}

.skip-link:hover {
    color: var(--teal);
}

button.back-link {
    border: 0;
    background: none;
    text-decoration: none;
}

.stepper form {
    display: inline-flex;
}

.stepper button.step-dot,
.stepper a.step-dot {
    border: 2px solid transparent;
    text-decoration: none;
}

.stepper button.step-dot.done,
.stepper a.step-dot.done {
    background-color: var(--cream);
    border-color: var(--teal);
    color: var(--teal);
    cursor: pointer;
}

.lead-form .form-check-input:checked {
    background-color: var(--teal);
    border-color: var(--teal);
}

.footer-disclaimer {
    padding-bottom: 1.5rem;
}

.cms-content h2,
.cms-content h3 {
    color: var(--ink);
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: .75rem;
}

.cms-content a {
    color: var(--teal);
}

/* ---------- Inline "ask about this question" helper ---------- */
/* Embedded in the assessment flow's document flow, next to the
   current question — not a floating widget. */

.qa-helper {
    margin-top: 1.75rem;
}

.qa-helper-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--pill-border);
    background-color: var(--pill);
    color: var(--teal);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font-size: .88rem;
    font-weight: 500;
    transition: all .15s ease;
}

.qa-helper-toggle:hover {
    background-color: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.qa-helper-toggle.open {
    background-color: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.qa-helper-panel {
    margin-top: .85rem;
    background-color: #fff;
    border: 1px solid var(--pill-border);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(70, 60, 40, .1);
    padding: 1rem 1.1rem;
    max-width: 480px;
}

.qa-helper-messages {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: .75rem;
}

.qa-helper-messages:empty {
    display: none;
}

.qa-msg {
    max-width: 90%;
    padding: .55rem .8rem;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.qa-msg-assistant {
    background-color: var(--pill);
    color: var(--ink);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.qa-msg-user {
    background-color: var(--teal);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.qa-typing {
    letter-spacing: .2em;
    animation: qaPulse 1s ease infinite;
}

@keyframes qaPulse {
    50% { opacity: .45; }
}

.qa-helper-input {
    display: flex;
    gap: .5rem;
}

.qa-helper-input input {
    flex: 1;
    border: 1px solid var(--pill-border);
    background-color: var(--cream);
    border-radius: 10px;
    padding: .55rem .8rem;
    font-size: .88rem;
}

.qa-helper-input input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 .15rem rgba(46, 115, 119, .15);
}

.qa-helper-input button {
    border: none;
    background-color: var(--teal);
    color: #fff;
    border-radius: 10px;
    width: 42px;
    transition: background-color .2s ease;
}

.qa-helper-input button:hover {
    background-color: var(--teal-dark);
}

.qa-helper-input button:disabled {
    opacity: .6;
}

.qa-helper-disclaimer {
    font-size: .7rem;
    color: var(--muted);
    margin-top: .6rem;
}

@media (max-width: 575.98px) {
    .qa-helper-panel {
        max-width: 100%;
    }
}
