/* Scanner UI from Discover Profile, adapted for WhatsMyName's Tailwind 2 theme. */
[hidden] { display: none !important; }
:root {
    --dpt-brand: #667eea;
    --dpt-line-strong: #c7d2fe;
}
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid #c7d2fe;
    border-radius: .75rem;
    padding: .65rem 1rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}
.btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.btn-secondary { color: #5a67d8; background: #fff; }
.btn-secondary:hover { background: #eef2ff; }
.btn-danger { border-color: #dc2626; color: #fff; background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-danger:focus-visible {
    outline: 3px solid #c7d2fe;
    outline-offset: 2px;
}
.btn-primary.hidden, .btn-secondary.hidden, .btn-danger.hidden { display: none; }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { cursor: not-allowed; opacity: .6; }
.section-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.osint-modal-backdrop { background: rgba(17, 24, 39, .45); }
.osint-z-70 { z-index: 70; }
.osint-z-80 { z-index: 80; }
.osint-z-90 { z-index: 90; }
.osint-z-100 { z-index: 100; }
.osint-notice-width { max-width: calc(100vw - 2rem); }
.osint-notice-out { transform: translateX(120%); }
.osint-progress-transition { transition-property: width; }
.osint-sidebar-width { width: 88vw; }
.osint-sidebar { transform: translateX(0); }
.osint-sidebar.translate-x-full { transform: translateX(100%); }
.osint-sidebar > div:first-child { background: linear-gradient(135deg, #eef2ff, #fff, #faf5ff); }
.osint-sidebar #user-sidebar-close { border-radius: .75rem; }
#results-container > div > div { padding: 1rem; }
#results-list article { border-radius: 1rem; box-shadow: 0 1px 3px rgba(102, 126, 234, .08); }
#results-list article > div:first-child { border-radius: 1rem 1rem 0 0; }
.js-scan-log-group { border-radius: 1rem; }
#loading-state { border-radius: 1rem; padding: 1.25rem; background: #f5f7ff; }
#scan-progress-bar, #scan-progress-bar[style] { border-radius: 999px; }
#scan-progress-bar { background: linear-gradient(135deg, #667eea, #764ba2); }
.scan-wave-loader { border-radius: .75rem; }
.border-x { border-left-width: 1px; border-right-width: 1px; }
.text-clip { text-overflow: clip; }
@media (min-width: 640px) {
    .sm\:text-clip { text-overflow: clip; }
}
@media (max-width: 639px) {
    #results-container > div > div { padding: .45rem; }
    #scan-progress-fraction, #scan-elapsed { white-space: nowrap; }
}
.privacy-mode-switch {
    position: relative;
    display: inline-flex;
    width: 2.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

.privacy-mode-switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.privacy-mode-track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid var(--dpt-line-strong);
    border-radius: 999px;
    background: #e0e7ff;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.privacy-mode-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(24, 33, 31, 0.24);
    transition: transform 150ms ease;
}

.privacy-mode-switch input:checked + .privacy-mode-track {
    border-color: var(--dpt-brand);
    background: var(--dpt-brand);
}

.privacy-mode-switch input:checked + .privacy-mode-track .privacy-mode-thumb {
    transform: translateX(1rem);
}

.privacy-mode-switch input:focus-visible + .privacy-mode-track {
    outline: 3px solid rgba(102, 126, 234, 0.32);
    outline-offset: 2px;
}

.privacy-mode-switch input:disabled {
    cursor: not-allowed;
}

#privacy-mode-control.is-locked {
    opacity: 0.56;
}

.privacy-mode-tip {
    position: absolute;
    z-index: 45;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(19rem, calc(100vw - 3rem));
    border: 1px solid var(--dpt-line-strong);
    padding: 0.75rem 0.85rem;
    color: #4b5563;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(24, 33, 31, 0.12);
    font-size: 0.72rem;
    line-height: 1.45;
}

.privacy-mode-tip[hidden] {
    display: none !important;
}

.source-link-help-button {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dpt-line-strong);
    border-radius: 999px;
    color: #6b7280;
    background: #fff;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.source-link-help-button:hover,
.source-link-help-button:focus-visible,
.source-link-help-wrap.is-open .source-link-help-button {
    border-color: var(--dpt-brand);
    color: var(--dpt-brand);
}

.source-link-help-button:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.24);
    outline-offset: 2px;
}

.source-link-help-tip {
    position: absolute;
    z-index: 50;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(17rem, calc(100vw - 3rem));
    border: 1px solid var(--dpt-line-strong);
    padding: 0.7rem 0.8rem;
    color: #4b5563;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(24, 33, 31, 0.12);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.2rem);
    visibility: hidden;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.source-link-help-wrap:hover .source-link-help-tip,
.source-link-help-wrap.is-open .source-link-help-tip {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.scan-name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-name-viewport {
    max-height: 18rem;
    overflow: hidden;
}

.scan-name-viewport.is-expanded {
    max-height: none;
}

.scan-name-fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4rem;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 82%);
}

@media (min-width: 640px) {
    .scan-name-grid {
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    }

    .scan-name-viewport {
        max-height: 22rem;
    }
}


.scan-wave-loader {
    min-height: 48px;
    background-image: linear-gradient(90deg, rgba(102, 126, 234, 0.035) 1px, transparent 1px);
    background-size: 18px 100%;
}

.scan-wave-track {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.scan-wave-bar {
    width: 2px;
    height: 6px;
    background: var(--dpt-brand);
    transform-origin: center;
    animation: scanWave 1.05s ease-in-out infinite;
}

.scan-wave-bar:nth-child(1) { animation-delay: -600ms; }
.scan-wave-bar:nth-child(2) { animation-delay: -500ms; }
.scan-wave-bar:nth-child(3) { animation-delay: -400ms; }
.scan-wave-bar:nth-child(4) { animation-delay: -300ms; }
.scan-wave-bar:nth-child(5) { animation-delay: -200ms; }
.scan-wave-bar:nth-child(6) { animation-delay: -100ms; }
.scan-wave-bar:nth-child(7) { animation-delay: 0ms; }

.scan-wave-loader.is-paused .scan-wave-bar {
    opacity: 0.45;
    animation-play-state: paused;
}

.scan-log-viewport {
    position: relative;
}

.js-scan-log-group[data-log-state='partial'] .scan-log-viewport {
    max-height: 30rem;
    overflow: hidden;
}

.scan-log-fade {
    display: none;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4.5rem;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
}

.js-scan-log-group.has-log-overflow[data-log-state='partial'] .scan-log-fade {
    display: block;
}

@media (max-width: 639px) {
    .js-scan-log-group[data-log-state='partial'] .scan-log-viewport {
        max-height: 24rem;
    }
}

@keyframes scanWave {
    0%, 100% {
        opacity: 0.42;
        transform: scaleY(0.65);
    }
    50% {
        opacity: 1;
        transform: scaleY(2.7);
    }
}

.privacy-mode-tip, .source-link-help-tip { border-radius: .75rem; text-align: left; }
@media (prefers-reduced-motion: reduce) {
    .scan-wave-bar { animation: none; opacity: .72; }
}
