/* Hook Generator - tool-specific overrides on shared tools.css. */

/* -------------------------------------------------------------------
 * Brand tokens. Pink/fuchsia for Hook Generator - "scroll-stopping"
 * fits the concept, distinct from SR indigo / ATG teal / AISUM orange
 * / PG forest-green / DG red / RDC violet.
 * ------------------------------------------------------------------- */
:root {
    --hg-brand:      #db2777;
    --hg-brand-fade: #be185d;
    --hg-brand-tint: #fce7f3;

    /* Drive the shared .tone-pill picker. */
    --tone-brand:      var(--hg-brand);
    --tone-brand-fade: var(--hg-brand-fade);
    --tone-brand-tint: var(--hg-brand-tint);
}

/* -------------------------------------------------------------------
 * Form card
 * ------------------------------------------------------------------- */
.tool-form-card#hg-form-card {
    padding-top: 18px;
    padding-bottom: 14px;
}
.hg-field-row {
    margin-bottom: 12px;
}
.hg-field-label {
    display: block;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: 4px;
    font-size: 0.88rem;
}
.hg-field-label .hg-optional {
    font-weight: 400;
    color: var(--ink-500);
    font-size: 0.85em;
    margin-left: 4px;
}
.hg-char-count {
    font-size: 0.75rem;
    color: var(--ink-500);
    float: right;
    margin-top: 4px;
}
.hg-char-count.is-warning { color: #d97706; }
.hg-char-count.is-danger  { color: #dc2626; }

/* Per [[text-input-flex-basis-height]]: shared .text-input
 * `flex: 1 1 320px` collapses to 320px inside block parents. Force
 * full width in field rows. */
.hg-field-row .text-input,
.hg-field-row textarea,
.hg-field-row select,
.hg-topic-input,
.hg-input-line {
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}
.hg-topic-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Two-column options strip */
.hg-options {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--ink-50);
    border-radius: 10px;
    border: 1px solid var(--ink-100);
    margin-bottom: 12px;
}
.hg-option-cell {
    flex: 1 1 240px;
    min-width: 0;
}
.hg-option-cell .text-input,
.hg-option-cell select {
    width: 100%;
    box-sizing: border-box;
}
.hg-select {
    padding: 8px 10px;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink-800);
    background: #fff;
    cursor: pointer;
}
.hg-select:focus {
    outline: none;
    border-color: var(--hg-brand);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
}
.hg-option-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--ink-500);
    line-height: 1.4;
}

/* Live keyword preview card */
.hg-kw-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--ink-700);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}
.hg-kw-preview.is-loading { opacity: 0.65; }
.hg-kw-preview.is-empty { display: none; }
.hg-kw-preview-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    text-transform: uppercase;
}
.hg-kw-stat strong { color: var(--ink-900); font-weight: 700; }
.hg-kw-stat-muted  { color: var(--ink-500); font-style: italic; }

.hg-submit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.hg-submit-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ink-500);
    line-height: 1.4;
}

/* -------------------------------------------------------------------
 * Quota chip [hidden] override.
 * ------------------------------------------------------------------- */
.quota-chip[hidden] { display: none; }

/* -------------------------------------------------------------------
 * Progress region
 * ------------------------------------------------------------------- */
.progress-region#hg-progress {
    scroll-margin-top: 16px;
}
.hg-progress-bar-track {
    height: 6px;
    background: var(--ink-100);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}
.hg-progress-bar-fill {
    height: 100%;
    background: var(--hg-brand);
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 10%;
}
.hg-whimsy-msg {
    font-size: 0.875rem;
    color: var(--ink-600);
    min-height: 1.4em;
    text-align: center;
}

/* -------------------------------------------------------------------
 * Results region. Shared .results-region has no inner padding, so we
 * add per-tool padding for the card-stack content here
 * (per [[results-region-card-stack-inner-padding]]).
 * ------------------------------------------------------------------- */
.hg-results-body {
    padding: 18px 22px 4px 22px;
}
.hg-results-body > *:last-child { margin-bottom: 18px; }

.hg-topic-subhead {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--ink-50);
    border-left: 4px solid var(--hg-brand);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--ink-700);
    line-height: 1.5;
}
.hg-topic-subhead-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* Hook card stack - vertical, one card per hook */
.hg-hook-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}
.hg-hook-card {
    background: linear-gradient(180deg, var(--hg-brand-tint, #fce7f3) 0%, #ffffff 100%);
    border: 1.5px solid var(--hg-brand);
    border-radius: 12px;
    padding: 18px 22px 20px 22px;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.12);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: hg-card-appear 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hg-hook-card:hover {
    border-color: var(--hg-brand);
    box-shadow: 0 6px 18px rgba(219, 39, 119, 0.18);
    transform: translateY(-1px);
}
.hg-hook-card.is-regenerating { opacity: 0.55; pointer-events: none; }
@keyframes hg-card-appear {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.hg-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hg-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--hg-brand);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0 6px;
}

/* Archetype badge - distinct from strength badge */
.hg-archetype-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-700);
    background: var(--hg-brand-tint);
    border: 1px solid var(--ink-200);
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Strength score badge - color-coded by tier */
.hg-strength-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: help;
}
.hg-strength-badge.is-strong {
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
}
.hg-strength-badge.is-solid {
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}
.hg-strength-badge.is-okay {
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}
.hg-strength-badge.is-weak {
    color: var(--ink-600);
    background: var(--ink-100);
    border: 1px solid var(--ink-200);
}

/* Per-card actions: Copy + Regenerate */
.hg-card-header-actions {
    display: flex;
    gap: 6px;
}
.hg-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    color: var(--ink-700);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    padding: 0;
}
.hg-icon-btn:hover {
    background: var(--hg-brand-tint);
    border-color: var(--hg-brand);
    color: var(--hg-brand);
}
.hg-icon-btn svg { width: 14px; height: 14px; }
.hg-icon-btn.is-busy { pointer-events: none; opacity: 0.5; }
.hg-icon-btn.is-copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

/* Editable hook textarea */
.hg-hook-text {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ink-900);
    background: #fff;
    resize: vertical;
    min-height: 72px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.hg-hook-text:focus {
    outline: none;
    border-color: var(--hg-brand);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.10);
}

/* Card footer: char counter + reasons summary */
.hg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--ink-500);
}
.hg-char-counter {
    font-weight: 600;
}
.hg-char-counter.is-good   { color: #15803d; }
.hg-char-counter.is-warn   { color: #b45309; }
.hg-char-counter.is-danger { color: #dc2626; }
.hg-char-counter-budget { color: var(--ink-500); font-weight: 400; }

.hg-strength-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.7rem;
}
.hg-strength-reason {
    display: inline-block;
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    color: var(--ink-700);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Honest framing block */
.hg-caveat {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: 8px;
    font-size: 0.825rem;
    color: var(--ink-700);
    line-height: 1.55;
}
.hg-caveat summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: 6px;
}
.hg-caveat p {
    margin: 6px 0 0 0;
}

/* -------------------------------------------------------------------
 * Marketing banner / upgrade pitch
 * ------------------------------------------------------------------- */
.marketing-banner#hg-upgrade-banner {
    margin-top: 18px;
    padding: 16px 20px;
    background: var(--hg-brand-tint);
    border: 1px solid var(--hg-brand);
    border-radius: 10px;
    color: var(--ink-800);
}
.marketing-banner-title {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: var(--ink-900);
}
.marketing-banner-body {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--ink-700);
}
.marketing-banner-btn {
    display: inline-block;
}
