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

/* -------------------------------------------------------------------
 * Brand tokens. Pink-500 for the Instagram Name Generator (the middle
 * of the three Instagram-evocative colors: Bio = purple, Name = pink,
 * Caption = yellow). Distinct from HG fuchsia-600 and CIG rose-600.
 * ------------------------------------------------------------------- */
:root {
    --ing-brand:      #ec4899;
    --ing-brand-fade: #db2777;
    --ing-brand-tint: #fce7f3;

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

/* -------------------------------------------------------------------
 * Form card
 * ------------------------------------------------------------------- */
.tool-form-card#ing-form-card {
    padding-top: 18px;
    padding-bottom: 14px;
}
.ing-field-label {
    display: block;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: 4px;
    font-size: 0.88rem;
}
.ing-field-label .ing-optional {
    font-weight: 400;
    color: var(--ink-500);
    font-size: 0.85em;
    margin-left: 4px;
}

/* Mode toggle (real name / niche) */
.ing-mode-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ing-mode-label {
    font-weight: 600;
    color: var(--ink-800);
    font-size: 0.88rem;
}
.ing-mode-toggle {
    display: inline-flex;
    background: var(--ink-100);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.ing-mode-btn {
    border: none;
    background: transparent;
    color: var(--ink-600);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.ing-mode-btn:hover { color: var(--ink-800); }
.ing-mode-btn.is-active {
    background: #fff;
    color: var(--ing-brand-fade);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Single-line input + counter */
.ing-field-row {
    margin-bottom: 12px;
}
.ing-char-count {
    font-size: 0.75rem;
    color: var(--ink-500);
    float: right;
    margin-top: 4px;
}
.ing-char-count.is-warning { color: #d97706; }
.ing-char-count.is-danger  { color: #dc2626; }

/* Per [[text-input-flex-basis-height]]: shared .text-input
 * `flex: 1 1 320px` collapses to a 320px width inside block parents.
 * Force full width. */
.ing-field-row .text-input,
.ing-input-line {
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}
.ing-input-line {
    font-size: 1rem;
    line-height: 1.5;
}
.ing-input-line:focus {
    outline: none;
    border-color: var(--ing-brand);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

/* Strategy chips */
.ing-strategy-row {
    margin-bottom: 14px;
}
.ing-strategy-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.ing-strategy-chip {
    flex: 1 1 180px;
    min-width: 0;
    text-align: left;
    background: #fff;
    border: 1.5px solid var(--ink-200);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ing-strategy-chip:hover {
    border-color: var(--ing-brand);
    background: var(--ing-brand-tint);
}
.ing-strategy-chip.is-active {
    border-color: var(--ing-brand);
    background: var(--ing-brand-tint);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}
.ing-strategy-chip-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink-900);
}
.ing-strategy-chip-desc {
    font-size: 0.75rem;
    color: var(--ink-500);
    line-height: 1.35;
}

/* Tone picker spacing */
.ing-tone-picker {
    margin: 0 0 12px 0;
    border: none;
    padding: 0;
}

/* Stylize checkbox row */
.ing-stylize-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: 10px;
    margin-bottom: 14px;
    cursor: pointer;
}
.ing-stylize-row input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--ing-brand);
    flex: 0 0 auto;
}
.ing-stylize-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
    color: var(--ink-800);
}
.ing-stylize-hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ink-500);
    line-height: 1.4;
}

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

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

/* -------------------------------------------------------------------
 * Progress region
 * ------------------------------------------------------------------- */
.progress-region#ing-progress {
    scroll-margin-top: 16px;
}
.ing-progress-bar-track {
    height: 6px;
    background: var(--ink-100);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}
.ing-progress-bar-fill {
    height: 100%;
    background: var(--ing-brand);
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 10%;
}
.ing-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 grid content here
 * (per [[results-region-card-stack-inner-padding]]).
 * ------------------------------------------------------------------- */
.ing-results-body {
    padding: 18px 22px 4px 22px;
}
.ing-results-body > *:last-child { margin-bottom: 18px; }

.ing-input-subhead {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--ink-50);
    border-left: 4px solid var(--ing-brand);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--ink-700);
    line-height: 1.5;
}
.ing-input-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;
}

/* Pair-card grid - responsive 2-up on wide, 1-up on narrow */
.ing-pair-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ing-pair-card {
    background: linear-gradient(180deg, var(--ing-brand-tint, #fce7f3) 0%, #ffffff 60%);
    border: 1.5px solid var(--ing-brand);
    border-radius: 12px;
    padding: 16px 18px 16px 18px;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.12);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: ing-card-appear 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ing-pair-card:hover {
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.18);
    transform: translateY(-1px);
}
.ing-pair-card.is-regenerating { opacity: 0.55; pointer-events: none; }
@keyframes ing-card-appear {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* Memorability stars */
.ing-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    cursor: help;
    font-size: 0.95rem;
    line-height: 1;
}
.ing-star { color: var(--ink-200); }
.ing-star.is-full { color: #f59e0b; }
.ing-star.is-half {
    color: #f59e0b;
    /* show a half star by clipping the right side */
    background: linear-gradient(90deg, #f59e0b 50%, var(--ink-200) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Per-card actions */
.ing-card-header-actions {
    display: flex;
    gap: 6px;
}
.ing-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fff;
    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;
}
.ing-icon-btn:hover {
    background: var(--ing-brand-tint);
    border-color: var(--ing-brand);
    color: var(--ing-brand-fade);
}
.ing-icon-btn svg { width: 14px; height: 14px; }
.ing-icon-btn.is-busy { pointer-events: none; opacity: 0.5; }
.ing-icon-btn.is-copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

/* Card body: handle + display name */
.ing-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ing-handle {
    display: flex;
    align-items: baseline;
    gap: 1px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink-900);
    word-break: break-all;
    line-height: 1.25;
}
.ing-handle-at {
    color: var(--ing-brand-fade);
    font-weight: 700;
}
.ing-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-800);
    line-height: 1.35;
    word-break: break-word;
}
.ing-display-stylized {
    font-size: 0.95rem;
    color: var(--ink-600);
    line-height: 1.35;
    word-break: break-word;
}

/* Rationale caption */
.ing-rationale {
    margin: 0;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--ink-600);
    line-height: 1.45;
}

/* Footer: Check on Instagram + cross-tool links */
.ing-card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--ink-100);
    padding-top: 10px;
}
.ing-ig-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ing-brand-fade);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--ing-brand);
    border-radius: 7px;
    background: #fff;
    transition: background 0.12s ease, color 0.12s ease;
}
.ing-ig-link:hover {
    background: var(--ing-brand);
    color: #fff;
}
.ing-ig-link:hover svg { stroke: #fff; }
.ing-ig-link svg { width: 14px; height: 14px; flex: 0 0 auto; }

.ing-xlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.ing-xlink {
    font-size: 0.78rem;
    color: var(--ink-600);
    text-decoration: none;
    border-bottom: 1px dotted var(--ink-300);
    transition: color 0.12s ease, border-color 0.12s ease;
}
.ing-xlink:hover {
    color: var(--ing-brand-fade);
    border-bottom-color: var(--ing-brand);
}

/* Honest-framing block */
.ing-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;
}
.ing-caveat summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: 6px;
}
.ing-caveat p { margin: 6px 0 0 0; }

/* -------------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------------- */
@media (max-width: 640px) {
    .ing-pair-grid {
        grid-template-columns: 1fr;
    }
    .ing-strategy-chip {
        flex: 1 1 100%;
    }
    .ing-results-body {
        padding: 14px 14px 4px 14px;
    }
}
