/* ============================================================
   B4 — Meta Tags Extractor. Tool-specific styles.
   Base shell, hero, buttons, FAQ, and CTA come from
   redirect-checker.css (loaded first).
   Angular clip-path corners only — never border-radius.
   ============================================================ */

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

.mtc-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-req { font-weight: 400; color: var(--neon-cyan); }

.mtc-input-row { display: flex; gap: 12px; align-items: stretch; }

.mtc-input {
    flex: 1 1 auto;
    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;
}
.mtc-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.mtc-input-row .btn-primary { flex: 0 0 auto; white-space: nowrap; }

.rate-limit-note { font-size: 13px; margin-top: 10px; }

@media (max-width: 600px) {
    .mtc-input-row { flex-direction: column; }
    .mtc-input { font-size: 16px; flex-basis: auto; clip-path: none; }
    .mtc-input-row .btn-primary { width: 100%; text-align: center; }
}

/* ---- Output shell + summary strip ------------------------------------- */

.mtc-output { margin-top: 36px; scroll-margin-top: 120px; }

.mtc-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: var(--clip-card);
    background: rgba(13, 13, 20, 0.5);
}

.mtc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: var(--clip-badge);
    background: rgba(255, 255, 255, 0.03);
}
.mtc-stat-num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--neon-cyan);
}
.mtc-stat-num--warn  { color: #fcd34d; }
.mtc-stat-num--issue { color: #f87171; }
.mtc-stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.mtc-truncated-note {
    flex: 1 0 100%;
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

@media (max-width: 560px) {
    .mtc-summary-strip { gap: 8px; }
    /* Two-per-row so the tiles read as one balanced scoreboard instead of
       leaving a lone 4th tile orphaned on its own line. */
    .mtc-stat { min-width: 0; flex: 1 1 calc(50% - 4px); padding: 8px 10px; }
    .mtc-stat-num { font-size: 24px; }
}

/* ---- Previews (Google result + social card) --------------------------- */

.mtc-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* start, not stretch: a SERP snippet is naturally shorter than a social
       card with an image — let each card hug its own content rather than
       stretching the short Google card and leaving a dead void below it. */
    align-items: start;
    gap: 16px;
    margin-bottom: 24px;
}

.mtc-preview-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: var(--clip-card);
    background: rgba(13, 13, 20, 0.5);
    padding: 16px 18px;
    min-width: 0;
}

.mtc-preview-caption {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Google result — light card so it reads like a real SERP snippet. */
.mtc-google {
    background: #fff;
    padding: 14px 16px;
    clip-path: var(--clip-badge);
}
.mtc-google-url {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #202124;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mtc-google-title {
    font-family: Arial, sans-serif;
    font-size: 19px;
    line-height: 1.3;
    color: #1a0dab;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.mtc-google-desc {
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #4d5156;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mtc-google .mtc-muted { color: #9aa0a6; font-style: italic; }

/* Social card — dark, matches the LinkGuard shell. */
.mtc-social {
    border: 1px solid rgba(255, 255, 255, 0.12);
    clip-path: var(--clip-badge);
    overflow: hidden;
    background: rgba(20, 22, 30, 0.7);
}
.mtc-social-img {
    width: 100%;
    aspect-ratio: 1.91 / 1;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mtc-social-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mtc-social-img--empty {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
}
.mtc-social-body { padding: 12px 14px; }
.mtc-social-site {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mtc-social-title {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mtc-social-desc {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mtc-social .mtc-muted { font-style: italic; opacity: .7; }

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

/* ---- Best-practice checks --------------------------------------------- */

.mtc-section-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.mtc-checks { margin-bottom: 24px; }

.mtc-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 3px;
    clip-path: var(--clip-badge);
    background: rgba(20, 22, 30, 0.5);
}
.mtc-check--ok    { border-left-color: #5af0cb; }
.mtc-check--warn  { border-left-color: #fcd34d; }
.mtc-check--issue { border-left-color: #f87171; }
.mtc-check--info  { border-left-color: #94a3b8; }

.mtc-check-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    clip-path: var(--clip-badge);
}
.mtc-check--ok    .mtc-check-icon { color: #5af0cb; background: rgba(90, 240, 203, 0.1); }
.mtc-check--warn  .mtc-check-icon { color: #fcd34d; background: rgba(252, 211, 77, 0.1); }
.mtc-check--issue .mtc-check-icon { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.mtc-check--info  .mtc-check-icon { color: #94a3b8; background: rgba(148, 163, 184, 0.1); }

.mtc-check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mtc-check-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.mtc-check-detail {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ---- Tag groups accordion --------------------------------------------- */

.mtc-groups { margin-bottom: 8px; }

.mtc-group {
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    clip-path: var(--clip-badge);
    background: rgba(20, 22, 30, 0.55);
}

.mtc-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.mtc-group-header::-webkit-details-marker { display: none; }

.mtc-group-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mtc-group-count {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    clip-path: var(--clip-badge);
}

.mtc-group-toggle {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform .2s;
}
details[open] .mtc-group-toggle { transform: rotate(180deg); }

/* ---- Per-group tag table ---------------------------------------------- */

.mtc-tag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.mtc-tag-table th {
    padding: 7px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    white-space: nowrap;
}
.mtc-tag-table th:nth-child(1) { width: 26%; }
.mtc-tag-table th:nth-child(3) { width: 72px; text-align: right; }

.mtc-tag-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
    word-break: break-word;
}
.mtc-tag-table tr:last-child td { border-bottom: none; }

.mtc-tag-key {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-all;
}
.mtc-tag-value {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-secondary, #c9d1d9);
}
.mtc-tag-len {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}
.mtc-muted { font-style: italic; color: var(--text-muted); }

@media (max-width: 640px) {
    .mtc-tag-table { table-layout: auto; }
    .mtc-tag-table thead { display: none; }
    .mtc-tag-table tr {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .mtc-tag-table td { display: block; padding: 3px 0; border: none; }
    .mtc-tag-len { text-align: left; }
}

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

.mtc-actions { margin-top: 22px; }

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