/* ============================================
   WHOIS HUEVOHOST (público) – styles/index.css
   Base copiada de verificar-dns para mantener el mismo look.
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:       #F75934;
    --brand-light: #FF8E2B;
    --active:      #22c55e;
    --suspended:   #ef4444;
    --radius:      16px;
    --shadow:      0 8px 30px rgba(0,0,0,.08);
    --transition:  .3s cubic-bezier(.4,0,.2,1);
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: var(--bg-color, #f5f6fa);
    color: var(--text-color, #1e293b);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px 60px;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}


/* ── Page header ── */
.page-header {
    text-align: center;
    margin: 40px 0 32px;
    width: 100%;
}
.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex; align-items: center; justify-content: center; gap: 14px;
}
.page-header h1 i { font-size: 1.8rem; -webkit-text-fill-color: var(--brand); }
.page-subtitle {
    margin-top: 8px;
    font-size: .95rem;
    color: var(--footer-text, #64748b);
}

/* ── Tool Container ── */
/* Dos columnas: izquierda buscador + DNS/proveedor, derecha validación */
.dns-layout {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 30px;
}
.dns-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-title {
    font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand); margin-bottom: 14px;
}
.dns-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    min-height: 260px; padding: 30px; text-align: center;
    border: 1px dashed var(--input-border, #e2e8f0); border-radius: var(--radius);
    color: var(--footer-text, #64748b); font-size: .92rem; line-height: 1.6;
}
.dns-empty i { font-size: 2rem; opacity: .6; }

.tool-card {
    background: var(--card-bg, #fff);
    width: 100%;
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--input-border, #e2e8f0);
}

/* ── Search Input ── */
.search-group {
    position: relative;
    margin-bottom: 20px;
}
.search-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font-size: 1.1rem;
}
.dns-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--input-border, #e2e8f0);
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    background: var(--input-bg, #fff);
    color: var(--text-color, #1e293b);
    transition: var(--transition);
    outline: none;
}
.dns-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(247, 89, 52, 0.1);
}

.check-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(247,89,52,.25);
}
.check-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(247,89,52,.35); }

/* ── Results ── */
.result-box {
    animation: fadeInUp 0.4s ease;
    padding: 25px;
    border-radius: var(--radius);
    background: var(--input-bg, #f8fafc);
    border: 1px solid var(--input-border, #e2e8f0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box.is-success { border-left: 5px solid var(--active); }
.result-box.is-error   { border-left: 5px solid var(--suspended); }

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.result-status {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.is-success .result-status { color: var(--active); }
.is-error .result-status   { color: var(--suspended); }

.server-badge {
    padding: 4px 14px;
    background: var(--brand);
    color: #fff;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.result-message {
    margin-top: 15px;
    font-size: .88rem;
    color: var(--footer-text, #64748b);
    line-height: 1.5;
}

/* ── Loader ── */
.spinner-wrap {
    display: none;
    text-align: center;
    padding: 30px;
}
.spinner {
    width: 40px; height: 40px;
    border: 4px solid rgba(247,89,52,.1);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.footer {
    margin-top: auto;
    text-align: center;
    font-size: .82rem;
    color: var(--footer-text, #94a3b8);
    padding: 20px;
}

.spinner-wrap p { margin-top: 15px; font-size: .9rem; color: var(--footer-text, #64748b); }

/* ── Resumen e informe ── */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--footer-text, #64748b); font-weight: 600; }
.kv dd { word-break: break-word; }
.mono, .dns-table td { font-family: monospace; font-size: .88rem; }
.muted { color: var(--footer-text, #64748b); }
.nv { color: #d97706; font-weight: 700; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pill-ok   { background: rgba(34,197,94,.12);  color: #16a34a; }
.pill-warn { background: rgba(245,158,11,.15); color: #d97706; }
.pill-bad  { background: rgba(239,68,68,.12);  color: var(--suspended); }
.pill-free { background: rgba(59,130,246,.12); color: #2563eb; }

.print-btn {
    margin-top: 18px; width: 100%; padding: 12px; border-radius: 30px; cursor: pointer;
    border: 2px solid var(--brand); background: transparent; color: var(--brand);
    font-family: inherit; font-size: .95rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition);
}
.print-btn:hover { background: var(--brand); color: #fff; }

.report {
    background: var(--card-bg, #fff); padding: 28px; border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--input-border, #e2e8f0);
    animation: fadeInUp .4s ease;
}
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.report-brand { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.report-head h2 { font-size: 1.6rem; word-break: break-all; }
.report-meta { font-size: .82rem; color: var(--footer-text, #64748b); margin: 4px 0 8px; }
.report h3 {
    font-size: .95rem; margin: 22px 0 12px; padding-bottom: 6px; color: var(--brand);
    border-bottom: 1px solid var(--input-border, #e2e8f0); display: flex; align-items: center; gap: 8px;
}
.dns-table { width: 100%; border-collapse: collapse; }
.dns-table th { text-align: left; width: 70px; padding: 8px 10px 8px 0; vertical-align: top; font-size: .85rem; color: var(--footer-text, #64748b); }
.dns-table td { padding: 8px 0; word-break: break-all; }
.dns-table tr + tr { border-top: 1px dashed var(--input-border, #e2e8f0); }
.raw { margin-top: 20px; font-size: .85rem; }
.raw summary { cursor: pointer; font-weight: 600; color: var(--footer-text, #64748b); }
.raw pre { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--input-bg, #f8fafc); white-space: pre-wrap; word-break: break-word; font-size: .8rem; }
.report-foot { margin-top: 22px; font-size: .78rem; color: var(--footer-text, #64748b); line-height: 1.5; }

.site-logo { display: inline-block; margin-bottom: 18px; }
.site-logo img { height: 34px; display: block; }
.print-btn + .print-btn { margin-top: 10px; }
.check-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.footer a { color: var(--brand); text-decoration: none; }

@media (max-width: 860px) {
    .dns-layout { grid-template-columns: minmax(0, 1fr); }
    .dns-empty  { min-height: 0; }
}

/* ── Impresión / PDF: solo el informe, como documento ── */
.print-logo { display: none; }
@page { size: A4 portrait; margin: 0; }
@media print {
    html, body { margin: 0 !important; padding: 0 !important; min-height: 0 !important; background: #fff !important; }
    body { display: block; color: #1f2937 !important; font-size: 10.5pt; }
    body > :not(main), .dns-layout > .dns-col:first-child, .print-btn, .raw:not([open]) { display: none !important; }
    .dns-layout { display: block; max-width: none; margin: 0; }

    /* El margen va en el informe: así no depende de la opción «Márgenes» del navegador */
    .report { padding: 16mm 15mm; border: none; border-radius: 0; box-shadow: none !important; background: #fff !important; animation: none; }
    .report * { color: #1f2937 !important; }
    .print-logo { display: block; height: 22px; margin-bottom: 10px; }

    .report-head { border-bottom: 3px solid #F75934; padding-bottom: 10px; align-items: flex-end; }
    .report-brand { color: #6b7280 !important; font-size: 8pt; }
    .report-head h2 { font-size: 20pt; margin-top: 2px; }
    .report-meta { color: #6b7280 !important; font-size: 8.5pt; margin: 6px 0 4px; }

    .report h3 {
        font-size: 11pt; margin: 18px 0 0; padding: 6px 10px; border: none;
        background: #fff3ef !important; border-left: 4px solid #F75934; color: #c2410c !important;
        break-after: avoid;
    }
    .report h3 i { color: #F75934 !important; }

    .kv, .dns-table { border: 1px solid #e5e7eb; border-top: none; width: 100%; }
    .kv { gap: 0; grid-template-columns: 38mm 1fr; }
    .kv dt, .kv dd { padding: 6px 10px; border-top: 1px solid #e5e7eb; font-size: 9.5pt; }
    .kv dt { background: #f9fafb !important; color: #4b5563 !important; }
    .dns-table th { width: 22mm; padding: 6px 10px; background: #f9fafb !important; color: #4b5563 !important; font-size: 9pt; }
    .dns-table td { padding: 6px 10px; font-size: 8.5pt; }
    .dns-table tr { border-top: 1px solid #e5e7eb !important; break-inside: avoid; }
    .mono, .dns-table td { font-size: 8.5pt; }

    .pill { border: 1px solid currentColor; background: none !important; }
    .report .pill-ok   { color: #15803d !important; }
    .report .pill-warn { color: #b45309 !important; }
    .report .pill-bad  { color: #b91c1c !important; }
    .report .pill-free { color: #1d4ed8 !important; }
    .report .muted { color: #9ca3af !important; }

    .raw pre { background: #f9fafb !important; border: 1px solid #e5e7eb; font-size: 8pt; }
    .report-foot { margin-top: 18px; padding-top: 8px; border-top: 1px solid #e5e7eb; font-size: 8pt; color: #6b7280 !important; }
}
