/* ============================================================
   D5 — Hreflang Validator
   Tool-specific styles. Shared tokens, buttons, FAQ, CTA,
   .related-tools-list chips come from redirect-checker.css
   (loaded first) and /static/landing/styles.css.
   Angular clip-path corners only — NEVER border-radius.
   ============================================================ */

/* ---- Form -------------------------------------------------------------- */

.hf-form-wrap {
    margin: 40px 0 16px;
}

/* Label sits above the row; the input and submit button share ONE row and
   stretch to identical height (same top/bottom axis). The hint lives BELOW
   the row so it never pushes the button out of alignment. */
.hf-form .field-label {
    display: block;
    margin-bottom: 6px;
}

.hf-field-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: stretch;
}

.hf-field-row .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .hf-field-row {
        grid-template-columns: 1fr;
    }
    .hf-field-row .btn-primary {
        width: 100%;
    }
}

.field-hint {
    margin: 6px 0 0;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.hf-input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 15px;
    background: rgba(13, 13, 20, 0.85);
    border: 1px solid rgba(0, 245, 212, 0.3);
    clip-path: var(--clip-badge);
    color: var(--text-primary);
    transition: border-color .2s, box-shadow .2s;
}

.hf-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

/* iOS Safari: 16px stops auto-zoom on input focus */
@media (max-width: 720px) {
    .hf-input { font-size: 16px; }
}

/* ---- Verdict banner --------------------------------------------------- */

.hf-verdict {
    padding: 16px 20px;
    margin: 32px 0 20px;
    border: 1px solid;
    border-left-width: 3px;
    clip-path: var(--clip-card);
    display: none;
}

.hf-verdict.is-visible { display: block; }

.hf-verdict-head {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}

.hf-verdict-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary, #b8c0c8);
    line-height: 1.5;
}

.hf-verdict.v-valid  { background: rgba(0, 245, 212, 0.07); border-color: rgba(0, 245, 212, 0.4); }
.hf-verdict.v-valid  .hf-verdict-head { color: #5af0cb; }
.hf-verdict.v-issues { background: rgba(255, 184, 0, 0.07); border-color: rgba(255, 184, 0, 0.4); }
.hf-verdict.v-issues .hf-verdict-head { color: #ffd365; }
.hf-verdict.v-none   { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.14); }
.hf-verdict.v-none   .hf-verdict-head { color: var(--text-primary); }
.hf-verdict.v-error  { background: rgba(255, 87, 87, 0.08); border-color: rgba(255, 87, 87, 0.45); }
.hf-verdict.v-error  .hf-verdict-head { color: #ff8888; }

/* ---- Summary tiles ---------------------------------------------------- */

.hf-summary-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 28px;
}

@media (max-width: 520px) {
    .hf-summary-tiles {
        grid-template-columns: 1fr;
    }
}

.hf-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px 16px;
    background: rgba(13, 13, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.09);
    clip-path: var(--clip-card);
    text-align: center;
}

.hf-tile-num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.hf-tile-label {
    margin-top: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.hf-tile-ok   .hf-tile-num { color: #5af0cb; }
.hf-tile-warn .hf-tile-num { color: #ffd365; }
.hf-tile-ok   { border-color: rgba(0, 245, 212, 0.18); }
.hf-tile-warn { border-color: rgba(255, 184, 0, 0.18); }

/* ---- Block titles ----------------------------------------------------- */

/* Parent-scoped so it beats the generic `.tools-page p` colour rule — these
   are <p> (not <h3>) to keep the document outline clean, but must read as
   full-strength section headings. */
.hf-cluster .hf-block-title,
.hf-entries-wrap .hf-block-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
}

.hf-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---- Cluster checks --------------------------------------------------- */

.hf-cluster { margin-bottom: 8px; }

.hf-cluster-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hf-cluster-list li {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 3px;
    clip-path: var(--clip-badge);
    background: rgba(13, 13, 20, 0.6);
    color: var(--text-secondary, #b8c0c8);
}

.hf-cluster-list li.sev-error { border-left-color: #ff5757; background: rgba(255, 87, 87, 0.06); }
.hf-cluster-list li.sev-warn  { border-left-color: #ffb800; background: rgba(255, 184, 0, 0.05); }
.hf-cluster-list li.sev-info  { border-left-color: var(--neon-cyan); background: rgba(0, 245, 212, 0.05); }
.hf-cluster-list li.sev-ok    { border-left-color: #2bd4a8; background: rgba(0, 245, 212, 0.05); }

.hf-cluster-sev {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-right: 8px;
}

.hf-cluster-list li.sev-error .hf-cluster-sev { color: #ff8888; }
.hf-cluster-list li.sev-warn  .hf-cluster-sev { color: #ffd365; }
.hf-cluster-list li.sev-info  .hf-cluster-sev { color: #5af0cb; }
.hf-cluster-list li.sev-ok    .hf-cluster-sev { color: #5af0cb; }

/* ---- Entries table ---------------------------------------------------- */

.hf-truncation-note {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hf-table-scroll { overflow-x: auto; }

.hf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.hf-table thead th {
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: rgba(13, 13, 20, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    white-space: nowrap;
}

.hf-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hf-table tbody tr:hover { background: rgba(0, 245, 212, 0.03); }

.hf-table td {
    padding: 8px 12px;
    vertical-align: top;
    line-height: 1.4;
}

.col-status { width: 64px; min-width: 64px; }
.col-code   { width: 120px; white-space: nowrap; }
.col-href   { min-width: 220px; word-break: break-all; }
.col-src    { width: 72px; }

.hf-table td.col-code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-primary);
}

.hf-table td.col-href {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary, #b8c0c8);
    word-break: break-all;
}

.hf-table td.col-src {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hf-self-badge {
    display: inline-block;
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 1px 6px;
    color: #5af0cb;
    background: rgba(0, 245, 212, 0.13);
    clip-path: var(--clip-badge);
}

.hf-xdefault-badge {
    display: inline-block;
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 1px 6px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.07);
    clip-path: var(--clip-badge);
}

/* Status badge in the table */
.hf-row-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    clip-path: var(--clip-badge);
}

.hf-row-badge-ok    { background: rgba(0, 245, 212, 0.13); color: #5af0cb; }
.hf-row-badge-error { background: rgba(255, 87, 87, 0.14);  color: #ff9b9b; }

.hf-row-issues {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hf-row-issues li {
    font-size: 11.5px;
    color: #ffb3b3;
    line-height: 1.4;
    padding-left: 12px;
    position: relative;
}

.hf-row-issues li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ---- Metadata row ----------------------------------------------------- */

.hf-metadata-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.hf-meta-item strong { color: var(--text-primary); }
.hf-mono { font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; }

/* ---- Actions ---------------------------------------------------------- */

.hf-actions { margin-top: 20px; }

@media (max-width: 480px) {
    .hf-actions .btn-secondary { width: 100%; text-align: center; }
    .product-cta a.btn-primary,
    .product-cta a.btn-secondary {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0 0 10px;
    }
}

/* ---- Post-results nudge ----------------------------------------------- */

.results-nudge {
    margin: 28px 0 0;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary, #b8c0c8);
    background: rgba(0, 245, 212, 0.05);
    border-left: 3px solid var(--neon-cyan);
    clip-path: var(--clip-badge);
}

.results-nudge a {
    color: var(--neon-cyan);
    font-weight: 600;
    text-decoration: none;
}

.results-nudge a:hover { text-decoration: underline; }
