/* ==========================================================================
   HubBroker iPaaS Validator Component Styles
   ========================================================================== */

.hb-validator-section {
    /* Brand Colors */
    --hb-green: #6e7740;
    --hb-green-dark: #5c6435;
    --hb-green-soft: #f6f7f0;
    --hb-green-border: #d7dcba;

    /* Slate & Monochrome */
    --hb-ink: #0f172a;
    --hb-ink-2: #1e293b;
    --hb-text: #1e293b;
    --hb-muted: #64748b;
    --hb-muted-light: #94a3b8;
    --hb-line: #e2e8f0;
    --hb-line-light: #f1f5f9;
    --hb-bg: #ffffff;
    --hb-bg-subtle: #f8fafc;
    --hb-white: #ffffff;

    /* Status Colors */
    --hb-error: #dc2626;
    --hb-error-soft: #fef2f2;
    --hb-error-border: #fecaca;
    --hb-warn: #b45309;
    --hb-warn-soft: #fffbeb;
    --hb-warn-border: #fde68a;
    --hb-info: #2563eb;
    --hb-info-soft: #eff6ff;
    --hb-info-border: #bfdbfe;

    /* Typography & Sizing */
    --hb-font: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --hb-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
    --hb-radius-sm: 6px;
    --hb-radius: 10px;
    --hb-radius-lg: 16px;
    --hb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --hb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --hb-shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08);

    font-family: var(--hb-font);
    font-weight: 400;
    color: var(--hb-text);
    background: var(--hb-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

.hb-validator-section *,
.hb-validator-section *::before,
.hb-validator-section *::after {
    box-sizing: border-box;
}

.hb-validator-section [hidden] {
    display: none !important;
}

.hb-validator-section code {
    font-family: var(--hb-mono);
    font-size: 0.85em;
    background: #f1f5f9;
    color: #334155;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.hb-validator-section .hb-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Focus States
   ========================================================================== */
.hb-validator-section .hb-chip:focus-visible,
.hb-validator-section .hb-drop:focus-visible {
    outline: 2px solid var(--hb-green);
    outline-offset: 2px;
}

/* ==========================================================================
   Hero Section & Clean Modern Dropzone (Matching Redesign)
   ========================================================================== */
.hb-validator-section .hb-hero {
    background: #ffffff;
    border-bottom: none;
    padding: 36px 0 16px;
    text-align: center;
}

.hb-validator-section .hb-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hb-validator-section .hb-hero-title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.8vw, 2.6rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hb-validator-section .hb-lead {
    margin: 0 0 32px;
    max-width: 680px;
    color: #64748b;
    font-size: 0.96rem;
    line-height: 1.6;
}

.hb-validator-section .hb-drop-wrap {
    width: 100%;
    max-width: 660px;
}

.hb-validator-section .hb-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 30px 24px;
    text-align: center;
    cursor: pointer;
    border: 2px dashed #93c5fd;
    border-radius: 18px;
    background: #ffffff;
    color: var(--hb-muted);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.hb-validator-section .hb-drop:hover,
.hb-validator-section .hb-drop.is-over {
    background: #f6f7f0;
    border-color: #6e7740;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(110, 119, 64, 0.2);
}

.hb-validator-section .hb-drop-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #edf0df;
    color: #6e7740;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.hb-validator-section .hb-drop:hover .hb-drop-icon,
.hb-validator-section .hb-drop.is-over .hb-drop-icon {
    background: #6e7740;
    color: #ffffff;
    transform: scale(1.05);
}

.hb-validator-section .hb-drop-title {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.hb-validator-section .hb-drop-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hb-validator-section .hb-drop-or {
    color: #64748b;
    font-weight: 500;
}

.hb-validator-section .hb-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: #6e7740;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(110, 119, 64, 0.25);
    transition: all 0.15s ease;
}

.hb-validator-section .hb-browse-btn:hover {
    background: #5c6435;
    box-shadow: 0 4px 8px rgba(110, 119, 64, 0.35);
    transform: translateY(-1px);
}

.hb-validator-section .hb-browse-btn svg {
    color: #ffffff;
}

.hb-validator-section .hb-file-limit {
    color: #64748b;
    font-size: 0.86rem;
}

/* ==========================================================================
   Main Results Section
   ========================================================================== */
.hb-validator-section .hb-main {
    padding-top: 0;
    padding-bottom: 50px;
}

.hb-validator-section .hb-busy {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--hb-white);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    box-shadow: var(--hb-shadow-sm);
    color: var(--hb-text);
}

.hb-validator-section .hb-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #e2e8f0;
    border-top-color: var(--hb-green-dark);
    border-radius: 50%;
    animation: hb-validator-spin 0.8s linear infinite;
}

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

.hb-validator-section .hb-alert {
    padding: 14px 18px;
    border-radius: var(--hb-radius);
    border: 1px solid;
    margin-bottom: 20px;
}

.hb-validator-section .hb-alert-error {
    background: var(--hb-error-soft);
    border-color: var(--hb-error-border);
    color: #991b1b;
}

/* ---------- Results Banner ---------- */
.hb-validator-section .hb-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border-radius: var(--hb-radius);
    border: 1px solid;
    margin-bottom: 20px;
    box-shadow: var(--hb-shadow-sm);
}

.hb-validator-section .hb-banner.is-valid {
    background: var(--hb-green-soft);
    border-color: var(--hb-green-border);
}

.hb-validator-section .hb-banner.is-invalid {
    background: var(--hb-error-soft);
    border-color: var(--hb-error-border);
}

.hb-validator-section .hb-banner-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--hb-white);
}

.hb-validator-section .is-valid .hb-banner-icon {
    background: #16a34a;
}

.hb-validator-section .is-invalid .hb-banner-icon {
    background: var(--hb-error);
}

.hb-validator-section .hb-banner h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.hb-validator-section .is-valid h2 {
    color: #166534;
}

.hb-validator-section .is-invalid h2 {
    color: #991b1b;
}

.hb-validator-section .hb-banner p {
    margin: 3px 0 0;
    font-size: 0.9rem;
}

.hb-validator-section .is-valid p {
    color: #15803d;
}

.hb-validator-section .is-invalid p {
    color: #b91c1c;
}

/* ==========================================================================
   Side-by-Side Summary Grid (Tables 1 & 2)
   ========================================================================== */
.hb-validator-section .hb-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 900px) {
    .hb-validator-section .hb-summary-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.hb-validator-section .hb-desc-card {
    background: var(--hb-white);
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--hb-shadow-sm);
    display: flex;
    flex-direction: column;
}

.hb-validator-section .hb-desc-header {
    background: #254958;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hb-validator-section .hb-col-title {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
}

.hb-validator-section .hb-desc-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.88rem;
    flex: 1;
}

.hb-validator-section .hb-desc-table tr {
    border-bottom: 1px solid #edf2f7;
    transition: background 0.15s ease;
}

.hb-validator-section .hb-desc-table tr:last-child {
    border-bottom: none;
}

.hb-validator-section .hb-desc-table tr:hover {
    background: #f8fafc;
}

.hb-validator-section .hb-desc-table td {
    padding: 12px 20px;
    vertical-align: middle;
}

.hb-validator-section .hb-desc-table td:first-child,
.hb-validator-section .hb-desc-header .hb-col-title:first-child {
    width: 45%;
}

.hb-validator-section .hb-desc-table td:last-child,
.hb-validator-section .hb-desc-header .hb-col-title:last-child {
    width: 55%;
    text-align: right;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hb-validator-section .hb-desc-cell-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.3;
}

.hb-validator-section .hb-desc-cell-sub {
    font-size: 0.81rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.3;
}

.hb-validator-section .hb-desc-val-main {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.hb-validator-section .hb-desc-val-sub {
    font-size: 0.78rem;
    color: #64748b;
    font-family: var(--hb-mono);
    word-break: break-all;
    margin-top: 4px;
    text-align: right;
}

.hb-validator-section .hb-desc-codeval {
    font-family: var(--hb-mono);
    font-size: 0.78rem;
    color: #334155;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    text-align: left;
}

.hb-validator-section .hb-val-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 0.92rem;
}

.hb-validator-section .hb-val-status.is-passed {
    color: #16a34a;
}

.hb-validator-section .hb-val-status.is-failed {
    color: #dc2626;
}

.hb-validator-section .hb-val-status.is-info {
    color: #2563eb;
    font-weight: 500;
}

.hb-validator-section .hb-val-status.is-warning {
    color: #d97706;
}

.hb-validator-section .hb-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.hb-validator-section .hb-score-badge .score-err {
    color: #dc2626;
    font-weight: 700;
}

.hb-validator-section .hb-score-badge .score-clean {
    color: #16a34a;
    font-weight: 700;
}

.hb-validator-section .hb-score-badge .score-warn {
    color: #d97706;
    font-weight: 700;
}

.hb-validator-section .hb-score-badge .score-zero {
    color: #64748b;
    font-weight: 600;
}

/* ==========================================================================
   Findings Card & List
   ========================================================================== */
.hb-validator-section .hb-findings-card {
    background: #ffffff;
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--hb-shadow-sm);
    margin-bottom: 28px;
}

.hb-validator-section .hb-findings-header {
    background: #254958;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.hb-validator-section .hb-findings-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hb-validator-section .hb-findings-title {
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hb-validator-section .hb-findings-count {
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 999px;
}

.hb-validator-section .hb-findings-header .hb-filters {
    display: flex;
    gap: 6px;
}

.hb-validator-section .hb-findings-header .hb-chip {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hb-validator-section .hb-findings-header .hb-chip:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
}

.hb-validator-section .hb-findings-header .hb-chip.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #254958;
}

.hb-validator-section .hb-findings-list {
    display: flex;
    flex-direction: column;
}

.hb-validator-section .hb-finding-row {
    padding: 14px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background 0.15s ease;
    border-left: 4px solid transparent;
}

.hb-validator-section .hb-finding-row:last-child {
    border-bottom: none;
}

.hb-validator-section .hb-finding-row:hover {
    background: #f8fafc;
}

.hb-validator-section .hb-finding-row.is-error {
    border-left-color: #dc2626;
    background: #fffdfd;
}

.hb-validator-section .hb-finding-row.is-warning {
    border-left-color: #f59e0b;
    background: #fffdfa;
}

.hb-validator-section .hb-finding-icon {
    font-size: 1.15rem;
    flex: none;
    line-height: 1.3;
    padding-top: 1px;
}

.hb-validator-section .hb-finding-body {
    flex: 1;
    min-width: 0;
}

.hb-validator-section .hb-finding-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.92rem;
    color: #0f172a;
    line-height: 1.45;
}

.hb-validator-section .hb-finding-rule {
    font-family: var(--hb-mono);
    font-weight: 700;
    font-size: 0.85rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 2px 7px;
    border-radius: 4px;
    color: #1e293b;
    white-space: nowrap;
    flex-shrink: 0;
}

.hb-validator-section .hb-finding-row.is-error .hb-finding-rule {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.hb-validator-section .hb-finding-row.is-warning .hb-finding-rule {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.hb-validator-section .hb-finding-text {
    font-weight: 500;
    color: #1e293b;
}

/* B2B-style Clean Line-wise / Structured Message */
.hb-validator-section .hb-b2b-finding-msg {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e293b;
}

.hb-validator-section .hb-b2b-header {
    display: inline;
    font-weight: 500;
    color: #1e293b;
}

.hb-validator-section .hb-b2b-lines {
    display: block;
    padding-left: 0;
    margin-top: 2px;
}

.hb-validator-section .hb-b2b-line {
    font-family: var(--hb-mono);
    font-size: 0.85rem;
    color: #334155;
    word-break: break-all;
    line-height: 1.5;
}

.hb-validator-section .hb-finding-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #64748b;
    flex-wrap: wrap;
}

.hb-validator-section .hb-finding-tag {
    background: #f1f5f9;
    border-radius: 4px;
    padding: 2px 7px;
    font-weight: 600;
    color: #475569;
}

.hb-validator-section .hb-finding-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: var(--hb-mono);
}

.hb-validator-section .hb-finding-row.is-error .hb-finding-line {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.hb-validator-section .hb-finding-row.is-warning .hb-finding-line {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

.hb-validator-section .hb-finding-loc {
    font-family: var(--hb-mono);
    font-size: 0.78rem;
    color: #475569;
    word-break: break-all;
}

.hb-validator-section .hb-empty {
    margin: 0;
    padding: 28px;
    text-align: center;
    color: var(--hb-muted);
    font-size: 0.92rem;
}

/* ==========================================================================
   Two-Column Informational Section (Clean Modern Card Design matching image)
   ========================================================================== */
.hb-validator-section .hb-how {
    margin-top: 10px;
    padding-top: 0;
}

.hb-validator-section .hb-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.hb-validator-section .hb-info-card {
    background: #ffffff;
    color: #1e293b;
    border-radius: 16px;
    padding: 28px 28px 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.hb-validator-section .hb-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.hb-validator-section .hb-card-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f6f7f0;
    border: 1px solid #d7dcba;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.hb-validator-section .hb-card-title {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.hb-validator-section .hb-card-sub {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.4;
}

/* Process Timeline (Left Card) */
.hb-validator-section .hb-process-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hb-validator-section .hb-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.hb-validator-section .hb-step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
    flex-shrink: 0;
}

.hb-validator-section .hb-step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6e7740;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    z-index: 2;
}

.hb-validator-section .hb-step-line {
    width: 2px;
    flex: 1;
    min-height: 50px;
    background: #cbd5e1;
    margin-top: 4px;
}

.hb-validator-section .hb-step-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f6f7f0;
    border: 1px solid #d7dcba;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.hb-validator-section .hb-step-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.hb-validator-section .hb-step-content h4 {
    margin: 0 0 3px;
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.hb-validator-section .hb-step-content p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
}

/* Formats Grid with Green Checkmark Badges (Right Card) */
.hb-validator-section .hb-info-formats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 12px;
}

.hb-validator-section .hb-info-formats li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.hb-validator-section .hb-info-formats li::before {
    display: none;
}

.hb-validator-section .hb-format-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6e7740;
    color: #ffffff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.hb-validator-section .hb-format-check svg {
    stroke: #ffffff;
}

/* Disclaimer Note Card */
.hb-validator-section .hb-disclaimer-card {
    margin-top: 24px;
    background: #f4f8fa;
    border: 1px solid #e1ebf0;
    border-radius: 10px;
    padding: 18px 24px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #475569;
}

.hb-validator-section .hb-disclaimer-card p {
    margin: 0 0 10px;
}

.hb-validator-section .hb-disclaimer-card p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .hb-validator-section .hb-info-formats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .hb-validator-section .hb-hero {
        padding: 36px 0 42px;
    }

    .hb-validator-section .hb-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hb-validator-section .hb-info-grid {
        grid-template-columns: 1fr;
    }

    .hb-validator-section .hb-info-formats {
        grid-template-columns: 1fr;
    }
}