/* ── H1 Scanner Widget Styles ──────────────────────────────────────────────
   Inherits your theme's font-family, --color-primary, and base font sizes.
   Override any variable in your theme's Custom CSS to reskin instantly.
   ────────────────────────────────────────────────────────────────────────── */

#h1-scanner-wrap {
    font-family: inherit;
    color: inherit;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Input row ── */
.h1s-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

#h1s-url {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: inherit;
}

#h1s-url:focus {
    border-color: var(--color-primary, #2563eb);
}

#h1s-btn {
    padding: 12px 28px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    background: var(--color-primary, #2563eb);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

#h1s-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

#h1s-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.h1s-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    margin-top: 0;
}

/* ── Progress ── */
#h1s-progress {
    margin-bottom: 24px;
}

.h1s-progress-bar-bg {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.h1s-progress-bar-fill {
    height: 100%;
    background: var(--color-primary, #2563eb);
    border-radius: 3px;
    width: 0%;
    transition: width 0.4s ease;
}

.h1s-progress-label {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ── Error box ── */
.h1s-error {
    background: #fff1f0;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 14px 18px;
    color: #b91c1c;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ── Summary stats ── */
.h1s-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.h1s-stat {
    flex: 1;
    min-width: 130px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
}

.h1s-stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.h1s-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.h1s-stat.total  .h1s-stat-number { color: inherit; }
.h1s-stat.ok     .h1s-stat-number { color: #16a34a; }
.h1s-stat.miss   .h1s-stat-number { color: #dc2626; }
.h1s-stat.multi  .h1s-stat-number { color: #d97706; }
.h1s-stat.errors .h1s-stat-number { color: #6b7280; }

/* ── Result sections ── */
.h1s-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.h1s-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
}

.h1s-section-header:hover { background: #ebebeb; }

.h1s-section-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-ok    { background: #16a34a; }
.dot-miss  { background: #dc2626; }
.dot-multi { background: #d97706; }
.dot-error { background: #9ca3af; }

.h1s-section-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    margin: 0;
}

.h1s-section-count {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
}

.count-miss  { background: #dc2626; }
.count-multi { background: #d97706; }
.count-ok    { background: #16a34a; }
.count-error { background: #9ca3af; }

.h1s-toggle {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}

/* ── URL list ── */
.h1s-url-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 360px;
    overflow-y: auto;
}

.h1s-url-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    animation: h1s-fadein 0.25s ease;
}

.h1s-url-item:last-child { border-bottom: none; }
.h1s-url-item:hover { background: #fafafa; }

.h1s-url-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }

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

.h1s-url-link {
    color: inherit;
    text-decoration: none;
    word-break: break-all;
    display: block;
}

.h1s-url-link:hover { text-decoration: underline; }

.h1s-url-h1-text {
    font-size: 12px;
    color: #16a34a;
    margin-top: 3px;
    font-style: italic;
    word-break: break-word;
}

.h1s-url-h1-text.multi { color: #d97706; }

/* ── Actions row ── */
.h1s-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.h1s-btn-outline {
    padding: 10px 22px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    background: transparent;
    color: var(--color-primary, #2563eb);
    border: 2px solid var(--color-primary, #2563eb);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.h1s-btn-outline:hover {
    background: rgba(37,99,235,0.07);
}

/* ── Animations ── */
@keyframes h1s-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .h1s-summary { flex-direction: column; }
    .h1s-stat { min-width: unset; }
}
