/*
 * Generator detail page: facts, startup / registration actions and forms.
 *
 * Loaded after gam.css on account pages; uses its --gam-* palette, which is
 * declared on .gam-panel (the detail page is a .gam-panel too).
 */

/* ── Detail page ─────────────────────────────────────────────────────── */

.gam-breadcrumb { margin-bottom: 1rem; font-size: 0.9em; }

.gam-detail__head { margin-bottom: 1.5rem; }
.gam-detail__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0; }
.gam-detail__subtitle { margin: 0.25rem 0 0.5rem; color: var(--gam-fg-2); }
.gam-detail__h3 { margin: 2rem 0 0.75rem; }
.gam-detail__note { margin: -0.4rem 0 0.75rem; font-size: 0.9em; color: var(--gam-fg-3); }

.gam-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.85rem 1.5rem;
    margin: 0;
    padding: 1rem;
    background: var(--gam-panel-2);
    border: 1px solid var(--gam-line);
    border-radius: 4px;
}

.gam-facts__item { margin: 0; }

.gam-facts dt {
    margin: 0 0 0.15rem;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gam-fg-3);
}

.gam-facts dd { margin: 0; }

/* ── Startup / registration actions ──────────────────────────────────── */

.gam-actions { display: grid; gap: 0.6rem; }

.gam-action {
    padding: 0.9rem 1rem;
    border: 1px solid var(--gam-line);
    border-radius: 4px;
    background: #fff;
}

.gam-action__summary { cursor: pointer; }
.gam-action__summary::marker { color: var(--gam-fg-3); }

.gam-action__title  { display: block; font-weight: 600; }
.gam-action__hint   { display: block; font-size: 0.88em; color: var(--gam-fg-3); }

/* The engine registration hand-off: a link out, not a form. */
.gam-action--link { display: block; }
.gam-action--link .gam-action__hint { display: block; margin-top: 0.15rem; }

.gam-action__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0.7rem 0 0;
}

.gam-action__cta .gam-action__hint { margin: 0; }

.gam-action__stamp {
    margin: 0.6rem 0 0;
    padding: 0.5rem 0.7rem;
    font-size: 0.9em;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 4px;
}

/* Phase-2 links are visible but deliberately inert. */
.gam-action--disabled {
    background: #f7f7f7;
    border-style: dashed;
    color: var(--gam-fg-3);
    cursor: not-allowed;
}

.gam-action--disabled .gam-action__title { color: var(--gam-fg-3); }

/* ── Forms ───────────────────────────────────────────────────────────── */

.gam-form-wrap { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--gam-line); }

.gam-form__intro { font-size: 0.92em; color: var(--gam-fg-2); }

/* The unit's identity, straight from Gillette's records — visible, submitted,
   and not editable on site. */
.gam-form__locked {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem 0.6rem;
    background: #f6f8fa;
    border: 1px solid #dfe3e8;
    border-radius: 4px;
}

.gam-form__locked legend {
    padding: 0 0.35rem;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.gam-form__locked input[readonly] {
    background: #eceff2;
    color: #374151;
    font-weight: 600;
    border-color: #d5dae0;
    cursor: default;
}

.gam-form__locked-note {
    margin: 0.6rem 0 0;
    font-size: 0.8em;
    color: var(--gam-fg-3);
}

.gam-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.85rem 1rem;
}

.gam-form__field { margin: 0; }
.gam-form__field--wide { grid-column: 1 / -1; }

.gam-form__field label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85em;
    font-weight: 600;
}

.gam-form__field input,
.gam-form__field select,
.gam-form__field textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--gam-line-2);
    border-radius: 3px;
    background: #fff;
}

.gam-req { color: #dc2626; margin-left: 0.15rem; }

.gam-form__actions { margin: 1.25rem 0 0; }

/* A second submission for the same generator is an explicit, deliberate act. */
.gam-resubmit__confirm { margin: 0.4rem 0 0; font-weight: 600; }
.gam-resubmit__confirm input { margin-right: 0.35rem; }

.gam-activation-log {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem 0.75rem 2rem;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 4px;
    font-size: 0.92em;
}
