/* =============================================
   LightningMine DNS Lookup — dns-lookup.css
   Matches lightningmine-diagnostics.css conventions
   ============================================= */

/* ── Filter buttons (DNS-specific, sits inside the form) ── */
.lm-dns-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lm-dns-filter-btn {
    background: #f0f4f8;
    border: 2px solid #d0d7e3;
    color: #5a6a7e;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.lm-dns-filter-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #e8f3fa;
}

.lm-dns-filter-btn.active {
    background: #e8f3fa;
    border-color: #0073aa;
    color: #0073aa;
}

/* ── Status bar ── */
.lm-dns-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5a6a7e;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f5f8fc;
    border-radius: 6px;
    border: 1px solid #d0d7e3;
}

.lm-dns-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    flex-shrink: 0;
}

.lm-dns-status-dot.loading {
    background: #ffc107;
    animation: lm-dns-pulse 1.2s infinite;
}

.lm-dns-status-dot.error {
    background: #dc3545;
}

@keyframes lm-dns-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.lm-dns-domain {
    font-family: "Courier New", Courier, monospace;
    font-weight: 600;
    color: #0073aa;
}

/* ── Record group (mirrors .lm-diag-section) ── */
.lm-dns-group {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
    animation: lm-dns-fadeup 0.2s ease both;
}

@keyframes lm-dns-fadeup {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lm-dns-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f7f7;
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
}

.lm-dns-group-header h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 14px;
    color: #1a1a2e;
}

/* Type badge colours (mirrors lm-diag section heading style) */
.lm-dns-type-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 0.8px;
    background: #dbeeff;
    color: #0073aa;
}

.lm-dns-type-badge.mx    { background: #d4f8e8; color: #1b7a40; }
.lm-dns-type-badge.txt   { background: #fff8d6; color: #7a5c00; }
.lm-dns-type-badge.ns    { background: #ede7ff; color: #5b34b5; }
.lm-dns-type-badge.soa   { background: #ffe8df; color: #9c3400; }
.lm-dns-type-badge.aaaa  { background: #d6f4ff; color: #0077a8; }
.lm-dns-type-badge.cname { background: #fde8e8; color: #b52020; }

.lm-dns-type-desc {
    font-size: 13px;
    color: #5a6a7e;
}

.lm-dns-record-count {
    margin-left: auto;
    font-size: 12px;
    color: #8a9bb0;
    font-family: "Courier New", Courier, monospace;
}

/* ── Table (extends .lm-diag-table) ── */
.lm-dns-group table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.lm-dns-group th {
    text-align: left;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a9bb0;
    background: #e8f4ff;
    border-bottom: 1px solid #ddd;
}

.lm-dns-group td {
    padding: 9px 14px;
    font-size: 13px;
    font-family: "Courier New", Courier, monospace;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: top;
    word-break: break-all;
    line-height: 1.5;
    color: #1a1a2e;
}

.lm-dns-group tr:last-child td { border-bottom: none; }
.lm-dns-group tr:hover td      { background: #f8fbff; }

.lm-dns-td-ttl  { color: #8a9bb0; font-size: 12px; white-space: nowrap; }
.lm-dns-td-prio { color: #c08000; font-weight: 700; }

/* ── Loader ── */
.lm-dns-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 36px 0;
    font-size: 14px;
    color: #5a6a7e;
    justify-content: center;
}

.lm-dns-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #d0d7e3;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: lm-dns-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes lm-dns-spin { to { transform: rotate(360deg); } }

/* ── Empty / error states ── */
.lm-dns-empty {
    padding: 28px 16px;
    font-size: 14px;
    color: #8a9bb0;
    text-align: center;
}

.lm-dns-error {
    background: #fff3f3;
    border: 1px solid #f5c0c0;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #c0392b;
    font-family: "Courier New", Courier, monospace;
    margin-bottom: 14px;
}

/* ── About box ── */
.lm-dns-about {
    margin-top: 20px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.lm-dns-about strong { color: #1a1a2e; }

/* ── Responsive ── */
@media (max-width: 580px) {
    .lm-dns-filters { gap: 6px; }
    .lm-dns-filter-btn { padding: 4px 10px; font-size: 11px; }
}
