/* =============================================================================
   tool-generator.css

   Form-and-output layout for the small client-side tools:
     /resignation-letter-generator
     /ats-keyword-bank

   Both are deterministic and run entirely in the browser. No LLM call, no
   endpoint, nothing to rate limit, and nothing that can hallucinate a fact into
   a document someone is about to hand their employer. That is a deliberate
   product choice, not a shortcut: a resignation letter is formulaic enough that
   a template engine beats a model, and it means the tool works unauthenticated
   at zero marginal cost.

   Shell classes (.score-hero, .light-section, .section-headline, .score-faq,
   .score-cta) come from resume-score-marketing.css. Tokens match it:
   ink #112349, brand #1363c6, muted #4c6188, tint #f8fafc.
   ============================================================================= */

.gen-section {
    padding: 84px 24px;
}

.gen-inner {
    margin: 0 auto;
    max-width: 1180px;
}

/* Two panes: inputs left, live output right. Collapses to one column early,
   because a cramped side-by-side is worse than stacking on a form this long. */
.gen-layout {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(320px, 420px) 1fr;
}

.gen-panel {
    background: #ffffff;
    border: 1px solid #e3eaf5;
    border-radius: 16px;
    overflow: hidden;
}

.gen-panel-head {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f8;
    padding: 16px 20px;
}

.gen-panel-title {
    color: #112349;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.gen-panel-sub {
    color: #4c6188;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 4px 0 0;
}

.gen-panel-body {
    padding: 20px;
}

/* ---------- form fields ---------- */

.gen-field {
    margin-bottom: 16px;
}

.gen-field:last-child {
    margin-bottom: 0;
}

.gen-label {
    color: #112349;
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.gen-hint {
    color: #6b7ea0;
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 3px;
}

.gen-input,
.gen-select,
.gen-textarea {
    background: #ffffff;
    border: 1px solid #d8e2f0;
    border-radius: 9px;
    color: #112349;
    font-family: inherit;
    font-size: 0.88rem;
    padding: 10px 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.gen-input:focus,
.gen-select:focus,
.gen-textarea:focus {
    border-color: #1363c6;
    box-shadow: 0 0 0 3px rgba(19, 99, 198, 0.12);
    outline: none;
}

.gen-textarea {
    min-height: 78px;
    resize: vertical;
}

.gen-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

/* ---------- situation chips ---------- */

.gen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.gen-chip {
    background: #ffffff;
    border: 1px solid #d8e2f0;
    border-radius: 999px;
    color: #4c6188;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 14px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gen-chip:hover {
    border-color: #1363c6;
    color: #1363c6;
}

.gen-chip.is-active {
    background: #1363c6;
    border-color: #1363c6;
    color: #ffffff;
}

/* ---------- output pane ---------- */

.gen-output {
    background: #ffffff;
    border: 1px solid #e3eaf5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
}

.gen-output-head {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f8;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 13px 20px;
}

.gen-output-actions {
    display: flex;
    gap: 8px;
}

.gen-letter {
    color: #33405c;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 26px 28px 30px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Unfilled fields render as the bracket token so the reader can see exactly what
   is still missing, rather than the tool silently emitting a broken sentence. */
.gen-letter .gen-todo {
    background: #fef3c7;
    border-radius: 3px;
    color: #b45309;
    font-weight: 600;
    padding: 1px 4px;
}

.gen-note {
    background: #f8fafc;
    border-top: 1px solid #eef2f8;
    color: #4c6188;
    font-size: 0.8rem;
    line-height: 1.55;
    padding: 14px 20px;
}

/* ---------- keyword bank ---------- */

.gen-kw-group {
    margin-bottom: 22px;
}

.gen-kw-group:last-child {
    margin-bottom: 0;
}

.gen-kw-label {
    color: #112349;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0 0 9px;
    text-transform: uppercase;
}

.gen-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.gen-kw {
    background: #f0f4ff;
    border: 1px solid #dbe6fa;
    border-radius: 7px;
    color: #1363c6;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 5px 11px;
}

.gen-empty {
    color: #6b7ea0;
    font-size: 0.88rem;
    line-height: 1.6;
    padding: 40px 24px;
    text-align: center;
}

@media (max-width: 900px) {
    .gen-layout {
        grid-template-columns: 1fr;
    }

    .gen-section {
        padding: 56px 18px;
    }

    .gen-letter {
        padding: 20px 18px 24px;
    }
}

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

    .gen-output-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
