/* ============================================================
   D2 — Robots.txt tester
   Tool-specific styles. Page shell, hero, buttons, FAQ, CTA and
   design tokens come from /static/css/tools/redirect-checker.css
   (loaded first) and /static/landing/styles.css.
   Angular clip-path corners only — never border-radius.
   ============================================================ */

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

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

.field-label {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.field-label .field-opt {
    font-weight: 400;
    color: var(--text-muted);
}

.rb-fields {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 14px;
    align-items: end;
}

@media (max-width: 720px) {
    .rb-fields {
        grid-template-columns: 1fr;
    }
}

/* Optional custom-UA field — its own full-width row below domain/path/submit. */
.rb-field-ua {
    margin-top: 14px;
}

.rb-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;
}

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

@media (max-width: 720px) {
    /* 16px stops iOS Safari from auto-zooming on focus. */
    .rb-input { font-size: 16px; }
    .rb-field-submit .btn-primary { width: 100%; }
}

.rb-field-submit .btn-primary {
    white-space: nowrap;
    /* Match the .rb-input box height (padding 14px + 15px line + 1px border =
       50px) so the button sits on the same axis as the inputs, not 3px short.
       align-items:stretch would over-stretch it to the label+input height. */
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Output ------------------------------------------------------------ */

.robots-output {
    margin-top: 36px;
}

/* Status banner */
.rb-status {
    padding: 16px 20px;
    margin-bottom: 28px;
    border: 1px solid;
    clip-path: var(--clip-card);
}

.rb-status-head {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
}

.rb-status-meta {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-muted);
    /* break-word (not break-all) so long URLs wrap but "bytes" stays whole. */
    overflow-wrap: break-word;
    word-break: normal;
}

.rb-status-meta a { color: var(--neon-cyan); text-decoration: none; }
.rb-status-meta a:hover { text-decoration: underline; }

.rb-status-ok    { background: rgba(0, 245, 212, 0.07); border-color: rgba(0, 245, 212, 0.4); }
.rb-status-ok .rb-status-head    { color: #5af0cb; }
.rb-status-warn  { background: rgba(255, 184, 0, 0.07); border-color: rgba(255, 184, 0, 0.4); }
.rb-status-warn .rb-status-head  { color: #ffd365; }
.rb-status-error { background: rgba(255, 87, 87, 0.08); border-color: rgba(255, 87, 87, 0.45); }
.rb-status-error .rb-status-head { color: #ff8888; }

.rb-tested-path {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

/* Per-crawler verdicts */
.rb-verdicts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.rb-verdict {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 3px;
    clip-path: var(--clip-badge);
    background: rgba(20, 22, 30, 0.7);
}

.rb-verdict-allowed { border-left-color: #5af0cb; }
.rb-verdict-blocked { border-left-color: #ff5757; }

.rb-verdict-ua {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.rb-verdict-badge {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 10px;
    clip-path: var(--clip-badge);
}

.rb-verdict-allowed .rb-verdict-badge { background: rgba(0, 245, 212, 0.15); color: #5af0cb; }
.rb-verdict-blocked .rb-verdict-badge { background: rgba(255, 87, 87, 0.16); color: #ff9b9b; }

.rb-verdict-rule {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

.rb-verdict-group {
    display: block;
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.85;
}

/* Block titles */
.rb-block-title {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

/* Warnings */
.warnings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warnings-list li {
    font-size: 13px;
    line-height: 1.5;
    padding: 9px 12px;
    margin-bottom: 8px;
    clip-path: var(--clip-badge);
    border-left: 3px solid;
}

.warnings-list .warn-error {
    color: #ff9b9b;
    border-color: #ff5757;
    background: rgba(255, 87, 87, 0.07);
}

.warnings-list .warn-warn {
    color: #ffd365;
    border-color: #ffb800;
    background: rgba(255, 184, 0, 0.06);
}

.warnings-list .warn-info {
    color: var(--text-secondary, #b8c0c8);
    border-color: rgba(0, 245, 212, 0.5);
    background: rgba(0, 245, 212, 0.04);
}

/* Parsed groups */
.rb-group {
    padding: 14px 16px;
    margin-bottom: 12px;
    background: rgba(13, 13, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: var(--clip-badge);
}

.rb-group-agents {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    word-break: break-all;
}

.rb-rule {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary, #b8c0c8);
    padding-left: 12px;
    word-break: break-all;
}

.rb-rule-disallow { color: #ff9b9b; }
.rb-rule-allow    { color: #7fe6a3; }
.rb-rule-delay,
.rb-rule-none     { color: var(--text-muted); }

/* Sitemaps */
.rb-sitemaps ul,
#rb-sitemaps {
    list-style: none;
    padding: 0;
    margin: 0;
}

#rb-sitemaps li {
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 6px 0;
    word-break: break-all;
}

#rb-sitemaps a { color: var(--neon-cyan); text-decoration: none; }
#rb-sitemaps a:hover { text-decoration: underline; }

/* Raw file */
.rb-raw {
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: var(--clip-badge);
    background: rgba(13, 13, 20, 0.6);
}

.rb-raw summary {
    cursor: pointer;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--neon-cyan);
    list-style: none;
}

.rb-raw summary::-webkit-details-marker { display: none; }
.rb-raw summary::before { content: "+ "; }
.rb-raw[open] summary::before { content: "− "; }

.rb-raw-pre {
    margin: 0;
    padding: 16px;
    max-height: 360px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.35);
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Post-results transitional nudge (highest-intent conversion moment) */
.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 code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-primary);
}

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

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

/* Actions */
.rb-actions {
    margin-top: 20px;
}

@media (max-width: 480px) {
    .rb-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;
    }
}
