/* ─── Inspector page — ourval-style layout ─────────────────────────────── */

.inspector-hero {
    padding: 4rem 0 2.5rem;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
    border-bottom: 1px solid #eef1f6;
}

.inspector-title {
    font-family: "Epilogue", system-ui, sans-serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    color: #0b1f3a;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.inspector-subtitle {
    color: #4a5878;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 0 2rem;
}

/* ─── Scan form ────────────────────────────────────────────────────────── */

.scan-form {
    display: flex;
    gap: 0.75rem;
    max-width: 720px;
    align-items: stretch;
}

.scan-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.scan-input-icon {
    position: absolute;
    left: 14px;
    color: #6b7c98;
    pointer-events: none;
}

#scan-url {
    width: 100%;
    height: 52px;
    padding: 0 18px 0 44px;
    border: 1px solid #d6dce7;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
    font-size: 1rem;
    color: #0b1f3a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#scan-url:focus {
    outline: none;
    border-color: #2d5cf6;
    box-shadow: 0 0 0 4px rgba(45, 92, 246, 0.12);
}

.scan-btn {
    min-width: 130px;
    height: 52px;
    position: relative;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.scan-btn.is-loading .scan-btn-label { opacity: 0; }
.scan-btn.is-loading .scan-btn-spinner { opacity: 1; }

.scan-btn-spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    animation: scan-spin 0.7s linear infinite;
    opacity: 0;
    transition: opacity 0.15s;
}

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

.scan-hint {
    margin-top: 1rem;
    color: #6b7c98;
    font-size: 0.9rem;
}

.example-link {
    background: none;
    border: none;
    padding: 0;
    color: #2d5cf6;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.example-link:hover { color: #1442d4; }

/* ─── Main results area ────────────────────────────────────────────────── */

.inspector-main { padding: 2.5rem 0 5rem; }

.scan-placeholder {
    text-align: center;
    color: #8392ad;
    padding: 3rem 1rem;
    border: 1px dashed #d6dce7;
    border-radius: 12px;
    max-width: 560px;
    margin: 1.5rem auto 0;
}

.scan-error {
    background: #fff4f4;
    border: 1px solid #f5b5b5;
    color: #8e1c1c;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ─── Results header ───────────────────────────────────────────────────── */

.results-header {
    margin-bottom: 1.5rem;
}

.results-header h2 {
    font-family: "Epilogue", system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b1f3a;
    margin: 0 0 0.25rem;
}

.results-url {
    color: #2d5cf6;
    text-decoration: none;
    font-weight: 600;
}

.results-url:hover { text-decoration: underline; }

.results-meta {
    color: #8392ad;
    font-size: 0.85rem;
    margin: 0;
}

/* ─── Summary boxes ────────────────────────────────────────────────────── */

.summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.summary-card {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1.5px solid;
    background: #fafbfd;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-card-eu {
    background: #f1faf4;
    border-color: #b9e3c5;
}

.summary-card-eu .summary-count { color: #1d7d3a; }

.summary-card-noneu {
    background: #fff8e6;
    border-color: #f0c878;
}

.summary-card-noneu .summary-count { color: #a4671b; }

.summary-count {
    font-family: "Epilogue", system-ui, sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
}

.summary-label {
    color: #4a5878;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ─── Category cards ───────────────────────────────────────────────────── */

.results-categories {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cat-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border: 1.5px solid;
    border-radius: 12px;
    background: #ffffff;
    transition: transform 0.1s;
}

.cat-card-eu     { border-color: #b9e3c5; background: #f7fcf9; }
.cat-card-noneu  { border-color: #f0c878; background: #fffaef; }
.cat-card-unknown{ border-color: #d6dce7; background: #fafbfd; }

.cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(45, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d5cf6;
    flex-shrink: 0;
}

.cat-card-eu     .cat-icon { background: rgba(29, 125, 58, 0.10); color: #1d7d3a; }
.cat-card-noneu  .cat-icon { background: rgba(164, 103, 27, 0.10); color: #a4671b; }
.cat-card-unknown .cat-icon{ background: rgba(107, 124, 152, 0.10); color: #6b7c98; }

.cat-body { flex: 1; min-width: 0; }

.cat-name {
    color: #8392ad;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    margin: 0 0 0.25rem;
    letter-spacing: 0.01em;
}

.cat-provider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cat-provider-name {
    font-weight: 700;
    color: #0b1f3a;
    font-size: 1rem;
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid;
}

.cat-badge-eu     { background: #e7f6ed; border-color: #b9e3c5; color: #1d7d3a; }
.cat-badge-noneu  { background: #fdf2dc; border-color: #f0c878; color: #a4671b; }
.cat-badge-unknown{ background: #f1f3f7; border-color: #d6dce7; color: #6b7c98; }

.cat-details-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.45rem;
    color: #6b7c98;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cat-details-toggle:hover { color: #2d5cf6; }

.cat-details {
    margin-top: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(11, 31, 58, 0.04);
    border-radius: 8px;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.78rem;
    color: #4a5878;
    word-break: break-all;
    line-height: 1.55;
}

/* ─── NOT DETECTED section ────────────────────────────────────────────── */

.not-detected {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef1f6;
}

.not-detected-title {
    color: #8392ad;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.not-detected-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.not-detected-list li {
    padding: 0.45rem 0.85rem;
    background: #f5f6fa;
    color: #8392ad;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .scan-form { flex-direction: column; }
    .scan-btn { width: 100%; }
    .summary-row { grid-template-columns: 1fr; }
}
