/* ==========================================================
   DNS LOOKUP TOOL – style.css
   Minimal CSS bridge for script.js dynamic HTML injection.
   Everything else is handled by Tailwind.
   ========================================================== */

/* Active State for Quick Pills (Overrides Tailwind) */
.type-pill.active {
    background-color: #2563eb !important; /* blue-600 */
    border-color: #2563eb !important;
    color: white !important;
}

/* Custom Spinner injected by JS */
.dns-spinner {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* Shake Animation for bad input */
@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.input-shake { 
    animation: inputShake 0.4s ease; 
}

/* Dynamic Results Table */
.dns-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
    margin-top: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.dns-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
}
.dns-table th {
    padding: 0.8rem 1rem;
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.dns-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #1e293b;
    font-size: 0.875rem;
}
.dns-table tr:last-child td { border-bottom: none; }
.dns-table tr:hover { background: #f8fafc; }

/* Dynamic Record Text Styling */
.record-data-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    display: block;
    word-break: break-all;
    line-height: 1.5;
    color: #334155;
}
.ttl-badge {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

/* Dynamic Record Badges injected by JS */
.record-type-label {
    display: inline-flex;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.badge-A     { background: #dcfce7; color: #166534; }
.badge-AAAA  { background: #f3e8ff; color: #6b21a8; }
.badge-CNAME { background: #e0f2fe; color: #0369a1; }
.badge-MX    { background: #fef9c3; color: #854d0e; }
.badge-TXT   { background: #f1f5f9; color: #334155; }
.badge-NS    { background: #ffedd5; color: #c2410c; }
.badge-SOA   { background: #fce7f3; color: #be185d; }
.badge-PTR   { background: #e0e7ff; color: #4338ca; }
.badge-SRV   { background: #fee2e2; color: #b91c1c; }
.badge-CAA   { background: #d1fae5; color: #047857; }
.badge-DNSKEY{ background: #f3f4f6; color: #374151; }
.badge-DS    { background: #f3f4f6; color: #374151; }
.badge-NAPTR { background: #ccfbf1; color: #0f766e; }

/* Dynamic Copy Button */
.btn-copy-row {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copy-row:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.btn-copy-row.copied {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdf4;
}

/* Tabs for "ALL" Results */
.rtab {
    padding: 0.35rem 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.rtab:hover {
    color: #2563eb;
    background: #eff6ff;
}
.rtab.active {
    background: white;
    border-color: #cbd5e1;
    color: #2563eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Copy Toast Notification */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.copy-toast.show {
    transform: translateY(0);
}