/* --------------------------------------------- */
/* Inquiry sheet (opened from the orbit)         */
/* --------------------------------------------- */

.inq-scrim {
    position: fixed;
    inset: 0;
    z-index: 5900;
    background: rgba(2, 6, 14, 0.62);
    opacity: 0;
    transition: opacity 220ms ease;
}

.inq-scrim.is-open {
    opacity: 1;
}

.inq-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    width: min(100%, 480px);
    max-height: 92vh;
    max-height: 92dvh;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    background: #0d1424;
    box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.5);
    color: var(--text);
    transform: translate(-50%, 100%);
    transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.inq-sheet.is-open {
    transform: translate(-50%, 0);
}

/* On wide screens the sheet is a centred dialog instead of a bottom sheet */
@media (min-width: 821px) {
    .inq-sheet {
        top: 50%;
        bottom: auto;
        max-height: min(720px, 90vh);
        border-bottom: 1px solid var(--line);
        border-radius: 26px;
        transform: translate(-50%, -44%);
        opacity: 0;
        transition:
            transform 240ms ease,
            opacity 240ms ease;
    }

    .inq-sheet.is-open {
        transform: translate(-50%, -50%);
        opacity: 1;
    }

    .inq-grabber {
        display: none;
    }
}

body.inquiry-open {
    overflow: hidden;
}

.inq-head {
    display: grid;
    gap: 12px;
    padding: 10px 18px 14px;
}

.inq-grabber {
    justify-self: center;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.inq-head-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inq-icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}

.inq-icon-btn svg {
    width: 18px;
    height: 18px;
}

.inq-step-label {
    flex: 1;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.inq-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.inq-progress i {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    transition: width 320ms ease;
}

.inq-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 18px 16px;
}

.inq-body h2 {
    margin: 0 0 6px;
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.inq-lead {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
}

.inq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inq-chip {
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.inq-chip[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #e0f6ff;
}

.inq-chip[aria-pressed="true"]::before {
    content: "✓ ";
    color: var(--accent);
}

.inq-cats {
    display: grid;
    gap: 10px;
}

.inq-cat {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Same as the orbit moons: the category as a small capital line, the description under it */
.inq-cat span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.inq-cat strong {
    font-size: 17px;
}

.inq-cat small {
    color: var(--muted);
    font-size: 13px;
}

.inq-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.inq-field label {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 800;
}

.inq-field label .inq-opt {
    color: var(--muted);
    font-weight: 500;
}

.inq-field input,
.inq-field textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.inq-field textarea {
    min-height: 110px;
    resize: vertical;
}

.inq-field input:focus,
.inq-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.12);
}

.inq-field.has-error input {
    border-color: #fca5a5;
}

.inq-error {
    margin: 0;
    color: #fca5a5;
    font-size: 13px;
}

.inq-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.inq-example {
    padding: 7px 12px;
    border: 1px dashed rgba(125, 211, 252, 0.4);
    border-radius: 999px;
    background: none;
    color: var(--muted-strong);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.inq-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.inq-person img {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.inq-person p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 14px;
}

.inq-person b {
    color: var(--text);
}

.inq-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.inq-foot {
    display: grid;
    gap: 10px;
    padding: 12px 18px max(16px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
}

.inq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 26px;
    border: 1px solid rgba(125, 211, 252, 0.55);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #dff8ff);
    color: var(--dark-text);
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.inq-btn[disabled] {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    cursor: not-allowed;
}

.inq-note {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
}

.inq-note b {
    color: var(--muted-strong);
    user-select: all;
}

.inq-note a {
    color: var(--muted-strong);
}

.inq-send-error {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
    font-size: 14px;
}

.inq-skip {
    justify-self: center;
    border: 0;
    background: none;
    color: var(--muted-strong);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.inq-sheet button:focus-visible,
.inq-sheet a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Done */
.inq-done {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding-top: 6px;
    text-align: center;
}

.inq-done img {
    width: 84px;
    height: 84px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    object-fit: cover;
}

.inq-check {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: -26px 0 0 60px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--dark-text);
    font-weight: 900;
}

.inq-summary {
    width: 100%;
    margin: 6px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 14px;
    text-align: left;
}

.inq-summary dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inq-summary dd {
    margin: 0 0 8px;
    color: var(--muted-strong);
}

.inq-summary dd:last-child {
    margin-bottom: 0;
}

.inq-next {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
    counter-reset: inq;
}

.inq-next li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 14px;
    counter-increment: inq;
}

.inq-next li::before {
    content: counter(inq);
    display: grid;
    flex: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

/* The tapped moon gets a short pulse so the tap visibly registers */
.orbit-card.is-tapped {
    animation: inq-tapped 380ms ease-out;
}

@keyframes inq-tapped {
    0% { box-shadow: 0 0 0 0 rgba(125, 211, 252, 0.6); }
    100% { box-shadow: 0 0 0 16px rgba(125, 211, 252, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .inq-sheet,
    .inq-scrim,
    .inq-progress i {
        transition: none;
    }

    .orbit-card.is-tapped {
        animation: none;
    }
}
