/**
 * Shared styles for the branding/naming generator family (Username,
 * Business Name, Slogan, Book Title, Company Name, Brand Name, Domain Name,
 * Podcast Name, Blog Name).
 *
 * The per-tool accent is injected as --ng-accent / --ng-accent-dark /
 * --ng-accent-tint by ng-page.php. Composes the shared tools.css primitives
 * (.tool-form-card, .results-region, .primary-btn, .ghost-btn, .history-*).
 */

:root {
    --ng-accent: #7c3aed;
    --ng-accent-dark: #6d28d9;
    --ng-accent-tint: #ede9fe;
}

/* Hero mark (inline SVG before the H1). */
.page-hero h1 .ng-hero-mark {
    width: 1em;
    height: 1em;
    vertical-align: -0.12em;
    margin-right: 0.4rem;
    color: var(--ng-accent);
}

.ng-intro {
    margin: 0 0 16px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ---- Form fields ---- */
.ng-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.ng-fields--two {
    grid-template-columns: 1fr 1fr;
}
.ng-field {
    display: flex;
    flex-direction: column;
}
.ng-field-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 5px;
}
/* flex: 0 0 auto neutralises the shared .text-input { flex: 1 1 320px }
 * 320px flex-basis, which would otherwise become a 320px HEIGHT inside this
 * column-flex field and render the single-line input as a giant box.
 * See the project [[text_input_flex_basis_height]] note. */
.ng-input {
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
    font-size: 1rem;
}

/* ---- Style pills ---- */
.ng-style-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.ng-style-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
}
.ng-style-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ng-style-pill {
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ng-style-pill:hover { border-color: var(--ng-accent); color: var(--ng-accent-dark); }
.ng-style-pill.is-active {
    background: var(--ng-accent);
    border-color: var(--ng-accent);
    color: #fff;
}

.ng-submit-row {
    margin-top: 18px;
}
.ng-submit-row .primary-btn {
    background: var(--ng-accent);
    border-color: var(--ng-accent);
}
.ng-submit-row .primary-btn:hover { background: var(--ng-accent-dark); border-color: var(--ng-accent-dark); }

/* ---- Results (card stack inside the shared .results-region, which has no
 * inner padding per [[results_region_inner_padding]]) ---- */
.ng-results-body {
    padding: 18px 20px 18px;
}
.ng-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ng-card {
    position: relative;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    background: #fff;
    padding: 14px 40px 13px 15px;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.ng-card:hover {
    border-color: var(--ng-accent);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.ng-card-name {
    font-size: 1.02rem;
    font-weight: 650;
    color: #1f2937;
    line-height: 1.3;
    word-break: break-word;
    cursor: pointer;
}
.ng-card-name:hover { color: var(--ng-accent-dark); }
.ng-card-note {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #7b8595;
    line-height: 1.35;
}
.ng-card-copy {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    background: #fafbfc;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ng-card:hover .ng-card-copy { color: #64748b; }
.ng-card-copy:hover {
    background: var(--ng-accent-tint);
    border-color: var(--ng-accent);
    color: var(--ng-accent-dark);
}
.ng-card-copy.is-copied {
    background: #dcfce7;
    border-color: #16a34a;
    color: #15803d;
}

/* ---- .com availability check (optional, per-tool domain_check flag) ---- */
/* Align the optional "Check .com" button (icon + label) with the plain-text
 * "Copy all" beside it. Scoped to namegen pages (this file is family-only),
 * so it cannot shift any other tool's results-header spacing. */
.results-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ng-check-com-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ng-check-com-btn:disabled { opacity: 0.55; cursor: progress; }

/* Stack the status UNDER the domain name (not beside it) so a long domain
 * wraps freely on its own line instead of fighting the status pill for width. */
.ng-card-domain {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed #eceff4;
    cursor: pointer;
}
.ng-card-domain-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: #64748b;
    word-break: break-all;
    transition: color 0.12s;
}
.ng-card-domain:hover .ng-card-domain-name { color: var(--ng-accent-dark); }
/* Base status is text-only with no pill; the colored states below add the
 * pill, so the pre-check / skip states render nothing. */
.ng-card-domain-status {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
/* Pre-check / skip: the span is empty, so collapse it (no stray column gap). */
.ng-card-domain-status:empty { display: none; }
.ng-card-domain.is-checking .ng-card-domain-status,
.ng-card-domain.is-available .ng-card-domain-status,
.ng-card-domain.is-taken .ng-card-domain-status,
.ng-card-domain.is-unknown .ng-card-domain-status {
    padding: 1px 8px;
    border-radius: 999px;
}
.ng-card-domain.is-checking .ng-card-domain-status { color: #64748b; background: #f1f5f9; font-weight: 600; }
.ng-card-domain.is-available .ng-card-domain-status { color: #15803d; background: #dcfce7; }
.ng-card-domain.is-taken .ng-card-domain-status { color: #64748b; background: #eef1f5; }
.ng-card-domain.is-unknown .ng-card-domain-status { color: #b45309; background: #fef3c7; }

.ng-more-row {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}
.ng-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ng-more-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ng-fields--two { grid-template-columns: 1fr; }
    .ng-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .ng-results-body { padding: 14px 14px 16px; }
}
