/*
================================================================================
    ML Software, LLC
    Copyright 2026. All rights reserved.

    Life IQ | lifeiq.mlsoftware.com
    assets/css/close.css

    Platform: IQ Platform
    Created : 2026-07-28
    Updated : 2026-07-28
    Version : 1.0.2

    The Daily Close. Every selector is namespaced .liq-close- , a prefix
    that did not exist before this file, so nothing here can collide
    with product.css, projects.css or truth.css.

    Loads after truth.css and before mobile-tabs.css.

    This screen is used at night, tired, on a phone, one-handed. That
    dictates everything below:

      - ONE question per screen, large, centred, nothing competing.
      - Inputs are 48px minimum, above the 44px touch floor, because
        accuracy drops when you are tired.
      - The nav row is pinned to the bottom so the thumb never travels.
      - No red anywhere. Not on integrity, not on a missed learning
        floor, not on an unslain dragon. A close that scolds is a close
        that gets avoided, and an avoided close is no data at all.

    The only emphasis in the file is the accent on a selected option and
    on the primary button. Everything else is quiet on purpose.

    Version History:
        1.0.2 - 2026-07-29 : overflow-x:hidden -> clip; hidden forces
                             overflow-y:auto and added a stray scrollbar.
        1.0.1 - 2026-07-28 : Same horizontal-overflow fix as
                             projects.css 1.0.1. This screen was least
                             exposed - one column, no chip row - but it
                             gets the same scoped box model and the same
                             min-width:0 so a long dragon title cannot
                             push the page sideways at the exact moment
                             the close is meant to feel effortless.
        1.0.0 - 2026-07-28 : Initial version.
================================================================================
*/

/* Scoped box model. Nothing here reaches outside the close. */
.liq-close-wrap,
.liq-close-wrap * {
    box-sizing: border-box;
}

.liq-close-wrap {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    gap: var(--space-5, 20px);
    padding-bottom: calc(var(--tabbar-h, 56px) + var(--space-4, 16px));
    max-width: 100%;
    overflow-x: clip;
}

.liq-close-loading {
    padding: var(--space-6, 24px);
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-min-body, 14px);
}

/* ---------------------------------------------------------------------------
   Progress. Four dots, no count. A "step 2 of 4" reads as a form, and a
   form is something you negotiate with.
   --------------------------------------------------------------------------- */

.liq-close-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2, 8px);
    padding-top: var(--space-2, 8px);
}

.liq-close-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition-fast, 120ms ease);
}

.liq-close-dot.is-on {
    background: var(--accent);
}

/* ---------------------------------------------------------------------------
   The step body
   --------------------------------------------------------------------------- */

.liq-close-step {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
    flex: 1 1 auto;
    padding-top: var(--space-4, 16px);
}

.liq-close-q {
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 0;
    font-family: var(--font-display, inherit);
    font-size: 26px;
    line-height: 1.25;
    color: var(--text-primary);
}

.liq-close-sub {
    margin: var(--space-4, 16px) 0 0 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.liq-close-hint {
    margin: 0;
    font-size: var(--font-min-secondary, 13px);
    line-height: 1.5;
    color: var(--text-dim);
}

.liq-close-note {
    margin: var(--space-2, 8px) 0 0 0;
    padding: var(--space-2, 8px) var(--space-3, 12px);
    font-size: var(--font-min-display, 12px);
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-left: 2px solid var(--border);
    border-radius: var(--radius-sm, 4px);
}

/* The dragon, quoted back. Warm orange because the dragon is different
   in kind from everything else, not merely more important. */
.liq-close-dragon {
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 0;
    padding: var(--space-3, 12px);
    font-size: 17px;
    line-height: 1.35;
    color: var(--text-primary);
    background: var(--bg-surface);
    border-left: 3px solid var(--dragon, var(--accent));
    border-radius: var(--radius-sm, 4px);
}

/* ---------------------------------------------------------------------------
   Options. Full-width rows, not chips - a tired thumb should not have
   to aim.
   --------------------------------------------------------------------------- */

.liq-close-opts {
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 8px);
}

.liq-close-opts--sub {
    flex-direction: row;
    flex-wrap: wrap;
}

.liq-close-opts--sub .liq-close-opt {
    flex: 1 1 30%;
    text-align: center;
    font-size: var(--font-min-secondary, 13px);
}

.liq-close-opt {
    min-width: 0;
    min-height: 48px;
    padding: 0 var(--space-4, 16px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--font-min-body, 14px);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast, 120ms ease);
}

.liq-close-opt:hover {
    color: var(--text-primary);
    border-color: var(--accent-bord);
}

.liq-close-opt.is-on {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* ---------------------------------------------------------------------------
   Inputs
   --------------------------------------------------------------------------- */

.liq-close-input {
    width: 100%;
    min-height: 48px;
    padding: var(--space-3, 12px);
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 4px);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px; /* 16px stops iOS zooming the viewport on focus. */
    line-height: 1.45;
    box-sizing: border-box;
    resize: vertical;
}

.liq-close-input:focus {
    outline: none;
    border-color: var(--accent);
}

.liq-close-input::placeholder {
    color: var(--text-dim);
}

/* ---------------------------------------------------------------------------
   Nav. Pinned low so the thumb never travels between steps.
   --------------------------------------------------------------------------- */

.liq-close-nav {
    display: flex;
    gap: var(--space-2, 8px);
    margin-top: auto;
    padding-top: var(--space-4, 16px);
    min-width: 0;
}

.liq-close-btn {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 52px;
    padding: 0 var(--space-4, 16px);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--font-min-body, 14px);
    cursor: pointer;
    transition: var(--transition-fast, 120ms ease);
}

.liq-close-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-bord);
}

.liq-close-btn--primary {
    flex: 2 1 auto;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-base);
}

/* ---------------------------------------------------------------------------
   Shutdown. The point is permission to stop thinking about today, so it
   is quiet, centred, and says nothing clever.
   --------------------------------------------------------------------------- */

.liq-close-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 8px);
    flex: 1 1 auto;
    padding: var(--space-6, 24px) var(--space-4, 16px);
    text-align: center;
}

.liq-close-done-h {
    margin: 0 0 var(--space-3, 12px) 0;
    font-family: var(--font-display, inherit);
    font-size: 28px;
    color: var(--text-primary);
}

.liq-close-done p {
    margin: 0;
    font-size: var(--font-min-body, 14px);
    color: var(--text-secondary);
}

.liq-close-rest {
    margin-top: var(--space-4, 16px) !important;
    font-size: 18px !important;
    color: var(--text-primary) !important;
}

.liq-close-done .liq-close-btn {
    flex: 0 0 auto;
    margin-top: var(--space-6, 24px);
    min-width: 160px;
}

/* ---------------------------------------------------------------------------
   Wider screens. The close stays narrow - a single question centred in a
   1400px window looks abandoned.
   --------------------------------------------------------------------------- */

@media (min-width: 700px) {

    .liq-close-wrap {
        max-width: 560px;
        margin: 0 auto;
    }

    .liq-close-q {
        font-size: 30px;
    }
}