/* ==========================================================================
   Request form — lede
   ========================================================================== */

.request-head {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.request-lede {
    margin: 12px 0 0;

    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* ==========================================================================
   Shell — boxed card with tabs, matches the original draft's .form-shell
   ========================================================================== */

.request-shell {
    max-width: 760px;
    margin: 0 auto;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}

.request-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.request-tab {
    flex: 1;
    padding: 18px 16px;
    text-align: center;

    font-size: 13px;
    color: var(--color-text-muted);

    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.request-tab .mono {
    font-family: ui-monospace, "SF Mono", "IBM Plex Mono", monospace;
}

.request-tab.is-active {
    color: var(--color-text);
    border-color: var(--color-accent);
}

/* Tabs double as navigation controls (tab 1 = back, tab 2 = next), but only
   while they aren't the active tab — matches the JS guards in back()/next(),
   which no-op when the tab's own step is already showing. */
.request-tab:not(.is-active) {
    cursor: pointer;
}

.request-tab:not(.is-active):hover {
    color: var(--color-text);
}

.request-form__body {
    padding: 36px;
}

@media (max-width: 600px) {
    .request-form__body {
        padding: 24px 20px;
    }
}

/* ==========================================================================
   Fields
   ========================================================================== */

.field {
    margin-bottom: 20px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.request-form label {
    display: block;
    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.request-form input[type="text"],
.request-form input[type="email"],
.request-form input[type="tel"],
.request-form select,
.request-form textarea {
    width: 100%;
    padding: 12px 14px;

    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);

    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;

    transition: border-color 0.15s ease, background 0.15s ease;
}

.request-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding-right: 40px;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239AA0A8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}
.request-form textarea {
    min-height: 90px;
    resize: vertical;
}

.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus {
    outline: none;
    background-color: var(--color-surface);
    border-color: var(--color-accent);
}

.request-form .field ul {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.request-form .field ul li {
    color: #e08585;
    font-size: 13px;
}

@media (max-width: 600px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Honeypot — visually hidden, but not display:none/hidden (some bots skip
   those) or off-canvas via visibility, to stay unreachable for real users.
   ========================================================================== */

.request-form__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Device cards (step 1)
   ========================================================================== */

.request-devices {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.device-card {
    position: relative;
    margin-bottom: 18px;
    padding: 24px;

    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.device-card:last-child {
    margin-bottom: 0;
}

.device-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.device-card__label {
    font-size: 12px;
    color: var(--color-accent);
}

.device-card__remove {
    font-size: 11px;
    color: var(--color-text-muted);
    text-decoration: underline;
    background: none;
    border: none;
}

.device-card__remove:hover {
    color: var(--color-text);
}

/* Hidden rather than removed from the DOM so Stimulus targets keep working
   when there's only one device left — it just can't be the one removed. */
.device-card__remove[hidden] {
    display: none;
}

.add-device-btn {
    display: block;
    width: 100%;
    margin: 18px 0 32px;
    padding: 14px;

    font-size: 13px;
    color: var(--color-accent);
    text-align: center;

    background: none;
    border: 1px dashed var(--color-border);
    border-radius: 8px;

    transition: border-color 0.15s ease, background 0.15s ease;
}

.add-device-btn:hover {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

/* ==========================================================================
   Existing-customer note (confirmation page)
   ========================================================================== */

.request-form__note {
    margin: 4px 0 28px;
    padding: 14px 18px;

    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.6;

    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: 8px;
}

/* ==========================================================================
   Step navigation
   ========================================================================== */

.request-form__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.step-indicator {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Confirmation page
   ========================================================================== */

.request-confirmation .wrap {
    max-width: 640px;
    text-align: center;
}

.request-confirmation .section-head p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.request-confirmation .btn {
    margin-top: 8px;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 600px) {
    .request-form__nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .request-form__nav .btn {
        width: 100%;
    }
}
