/* ── Form ── */
.geo-form--turnstile { flex-wrap: wrap; }
.geo-form--turnstile .geo-widget { flex-basis: 100%; }

/* ── Spinner ── */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--text-heading2);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ── Reverse DNS (PTR): loads after the page; its spinner sits in the card header while it does ── */
.loading-spinner {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    vertical-align: -0.15em;
}
.ptr-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-secondary); }
.ptr-retry { margin-left: 0.5rem; padding: 0.15rem 0.55rem; border: 1px solid var(--border-strong); border-radius: 5px; background: none; color: var(--text-primary); font-size: 0.8rem; cursor: pointer; }

/* ── Validation error ── */
#validation-error {
    display: none;
    color: var(--error-text);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    padding: 0.6rem 1rem;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 0.5rem;
}

/* ── Error banner (server-side) ── */
.result-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: 0.6rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid;
}

.result-banner .icon { font-size: 1.4rem; line-height: 1; }

.result-banner.banner-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

/* ── IP summary header ── */
.ip-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--info-bg);
    border-radius: 0.6rem;
    flex-wrap: wrap;
}

.ip-summary .ip-text {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-blue-dim);
    word-break: break-all;
}

.ip-version-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    color: var(--accent-blue-light);
    white-space: nowrap;
    margin-left: auto;
}

/* ── Result cards ── */
.results-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

/* Card header */
.card-header {
    background: var(--results-row-alt);
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.card-header .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-mono);
}

.card-header .card-source {
    font-size: 0.75rem;
    color: var(--text-dimmed);
    font-style: italic;
}

.card-header .card-header__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wdois-workspace .card-header .footer-ip__copy {
    margin-left: 0;
    min-width: 24px;
    min-height: 24px;
}

/* ── Data rows ── */
.geo-rows {
    list-style: none;
    padding: 0;
    margin: 0;
}

.geo-rows li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--results-row-alt);
}

.geo-rows li:last-child { border-bottom: none; }
.geo-rows li:nth-child(odd) { background: var(--results-row-alt); }

.geo-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    min-width: 130px;
    flex-shrink: 0;
    padding-top: 0.15em;
}

.geo-value {
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-word;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.geo-value .sans { font-family: system-ui, -apple-system, sans-serif; }

.geo-value a { color: var(--accent-blue-dim); text-decoration: none; }
.geo-value a:hover { color: var(--text-link-hover); text-decoration: underline; }

/* ── Network indicator pills ── */
.net-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: system-ui, -apple-system, sans-serif;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* blue — informational */
.pill-blue {
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    color: var(--accent-blue-light);
}

/* gray — neutral/low signal */
.pill-gray {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}

/* ── Org type badge (inline, small) ── */
.org-type {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--results-row-alt);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-family: system-ui, -apple-system, sans-serif;
    white-space: nowrap;
}

/* ── Unavailability notice ── */
.provider-unavailable {
    font-size: 0.8rem;
    color: var(--text-dimmed);
    padding: 0.65rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 0.6rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* ── Map ── */
.map-section {
    margin-bottom: 1.25rem;
}

#geo-map {
    height: 300px;
    border-radius: 0.75rem;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    z-index: 0;
}

.map-attribution {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dimmed);
    margin-top: 0.5rem;
}

/* ── Mobile ── */
@media (max-width: 640px) {

    .geo-rows li { flex-direction: column; gap: 0.25rem; }
    .geo-label { min-width: unset; }
    .ip-summary { flex-direction: column; align-items: flex-start; }
    .ip-version-badge { margin-left: 0; }
    #geo-map { height: 240px; }
}
