/* DetectServer — Minimal styles */

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, svg {
    max-width: 100%;
    height: auto;
}

/* Ensure all major sections never exceed the viewport */
header, main, section, footer, nav {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 0.6s linear infinite;
}

/* Info rows inside dl elements */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    gap: 1rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #9ca3af;
    font-size: 0.8125rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.info-value {
    color: #111827;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    min-width: 0;
}

/* Stack label/value vertically on narrow screens */
@media (max-width: 480px) {
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }
    .info-value {
        text-align: left;
    }
}

/* DNS tables — horizontal scroll on mobile */
.dns-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* DNS tables */
.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.dns-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background-color: #f9fafb;
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.dns-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    word-break: break-all;
}

.dns-table tr:last-child td {
    border-bottom: none;
}

/* Header tags */
.header-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    margin-bottom: 0.25rem;
    word-break: break-all;
    max-width: 100%;
}

.header-tag .header-name {
    color: #9ca3af;
}

.header-tag .header-val {
    color: #1f2937;
}

/* Collapsible sections */
.section-collapsed {
    display: none;
}

/* Confidence badges */
.confidence-high {
    background-color: #dcfce7;
    color: #166534;
}

.confidence-medium {
    background-color: #fef9c3;
    color: #854d0e;
}

.confidence-low {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Focus ring */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: #3b82f6;
    color: white;
}

/* Fade in for results */
#results:not(.hidden) {
    animation: fadeIn 0.25s ease-out;
}

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