/* ── Biometric HR Frontend Scanner Styles (Voxel & Elementor Compatible) ───── */

.bhr-frontend-wrap {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--ts-font-family, var(--e-global-typography-primary-font-family, inherit));
    box-sizing: border-box;
    color: var(--ts-text-color, var(--ts-body-color, #0f172a));
}

.bhr-frontend-wrap * {
    box-sizing: border-box;
}

/* Drop zone */
.bhr-frontend-wrap #bhr-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--ts-accent-1, var(--e-global-color-primary, #3b82f6));
    border-radius: var(--ts-radius, 12px);
    padding: 50px 30px;
    cursor: pointer;
    background: var(--ts-bg-color, #f8fafc);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    gap: 10px;
    text-align: center;
}

.bhr-frontend-wrap #bhr-drop-zone:hover,
.bhr-frontend-wrap #bhr-drop-zone.bhr-drag-over {
    background: var(--ts-bg-hover, #eff6ff);
    border-color: var(--ts-accent-2, var(--e-global-color-accent, #1d4ed8));
    transform: translateY(-1px);
}

.bhr-frontend-wrap #bhr-drop-zone .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--ts-accent-1, var(--e-global-color-primary, #3b82f6));
}

.bhr-frontend-wrap #bhr-drop-zone p {
    margin: 0;
    font-size: 16px;
    color: var(--ts-text-color, #334155);
    font-weight: 500;
}

.bhr-frontend-wrap .bhr-hint {
    font-size: 13px !important;
    color: var(--ts-text-muted, #94a3b8) !important;
    font-weight: 400 !important;
}

/* Preview */
.bhr-frontend-wrap #bhr-preview-wrap {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--ts-card-bg, #ffffff);
    padding: 20px;
    border-radius: var(--ts-radius, 12px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--ts-border-color, #e2e8f0);
}

.bhr-frontend-wrap .bhr-preview-top {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.bhr-frontend-wrap .bhr-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    width: 100%;
}

.bhr-frontend-wrap .bhr-preview-actions .button,
.bhr-frontend-wrap .bhr-preview-actions .bhr-btn,
.bhr-frontend-wrap .bhr-preview-actions .ts-btn,
.bhr-frontend-wrap .bhr-preview-actions button {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 15px;
    display: inline-flex;
    box-sizing: border-box;
}

.bhr-frontend-wrap #bhr-preview-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--ts-radius, 10px);
    display: block;
}

.bhr-frontend-wrap .bhr-consent-wrap,
.bhr-consent-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--ts-border-color, #f1f5f9);
}

.bhr-frontend-wrap .bhr-consent-checkbox,
.bhr-consent-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--ts-accent-1, #2563eb);
}

.bhr-frontend-wrap .bhr-consent-label,
.bhr-consent-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ts-text-color, #334155);
    cursor: pointer;
    line-height: 1.4;
    user-select: none;
}

.bhr-frontend-wrap #bhr-scan-btn:disabled,
.bhr-frontend-wrap #bhr-scan-btn.bhr-disabled,
#bhr-scan-btn:disabled,
#bhr-scan-btn.bhr-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

/* ── Tech Scanner Animation ─────────────────────────────────────────────── */
.bhr-frontend-wrap .bhr-scanner-frame,
.bhr-scanner-frame {
    position: relative;
    display: inline-block;
    border-radius: var(--ts-radius, 10px);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--ts-border-color, #cbd5e1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.bhr-frontend-wrap .bhr-scan-overlay,
.bhr-scan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(1px);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bhr-frontend-wrap .bhr-scan-laser,
.bhr-scan-laser {
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00f0ff, #10b981, #00f0ff, transparent);
    box-shadow: 0 0 15px #00f0ff, 0 0 30px #10b981, 0 2px 6px rgba(0,240,255,0.8);
    animation: bhrLaserSweep 1.6s ease-in-out infinite alternate;
    z-index: 10;
}

.bhr-frontend-wrap .bhr-reticle-corner,
.bhr-reticle-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-style: solid;
    border-color: #00f0ff;
    z-index: 8;
    animation: bhrReticlePulse 1.6s ease-in-out infinite alternate;
}

.bhr-frontend-wrap .bhr-corner-tl, .bhr-corner-tl { top: 6px; left: 6px; border-width: 3px 0 0 3px; border-top-left-radius: 3px; }
.bhr-frontend-wrap .bhr-corner-tr, .bhr-corner-tr { top: 6px; right: 6px; border-width: 3px 3px 0 0; border-top-right-radius: 3px; }
.bhr-frontend-wrap .bhr-corner-bl, .bhr-corner-bl { bottom: 6px; left: 6px; border-width: 0 0 3px 3px; border-bottom-left-radius: 3px; }
.bhr-frontend-wrap .bhr-corner-br, .bhr-corner-br { bottom: 6px; right: 6px; border-width: 0 3px 3px 0; border-bottom-right-radius: 3px; }

.bhr-frontend-wrap .bhr-hud-svg,
.bhr-hud-svg {
    width: 58px;
    height: 58px;
    z-index: 7;
    opacity: 0.85;
}

.bhr-hud-ring-outer {
    fill: none;
    stroke: #00f0ff;
    stroke-width: 2;
    stroke-dasharray: 8 6;
    transform-origin: center;
    animation: bhrSpinClockwise 4s linear infinite;
}

.bhr-hud-ring-inner {
    fill: none;
    stroke: #10b981;
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    transform-origin: center;
    animation: bhrSpinCounter 3s linear infinite;
}

.bhr-hud-line { stroke: #00f0ff; stroke-width: 2; stroke-linecap: round; }

/* Tech Loading Component */
.bhr-frontend-wrap .bhr-loading-tech,
.bhr-loading-tech {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: var(--ts-radius, 12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: #f8fafc;
    margin: 20px 0;
}

.bhr-tech-spinner { width: 36px; height: 36px; flex-shrink: 0; }
.bhr-spinner-svg { width: 100%; height: 100%; animation: bhrSpinClockwise 1.2s linear infinite; }
.bhr-spin-track { stroke: rgba(255, 255, 255, 0.15); }
.bhr-spin-head {
    stroke: #00f0ff;
    stroke-dasharray: 90;
    stroke-dashoffset: 40;
    stroke-linecap: round;
}

.bhr-loading-text-wrap { display: flex; flex-direction: column; gap: 4px; }
.bhr-tech-status-title { font-size: 14px; font-weight: 700; color: #00f0ff; letter-spacing: 0.5px; }
.bhr-tech-status-sub { font-size: 12px; color: #94a3b8; }

/* Buttons (Native Voxel .ts-btn and Elementor .elementor-button styling) */
.bhr-frontend-wrap .bhr-btn,
.bhr-frontend-wrap button,
.bhr-frontend-wrap a.button,
.bhr-frontend-wrap .ts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--ts-btn-radius, var(--ts-radius, 8px));
    border: 1px solid var(--ts-border-color, #cbd5e1);
    background: var(--ts-card-bg, #ffffff);
    color: var(--ts-text-color, #1e293b);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.bhr-frontend-wrap .bhr-btn:hover,
.bhr-frontend-wrap button:hover,
.bhr-frontend-wrap a.button:hover,
.bhr-frontend-wrap .ts-btn:hover {
    background: var(--ts-bg-hover, #f1f5f9);
    border-color: var(--ts-border-hover, #94a3b8);
}

.bhr-frontend-wrap .bhr-btn-primary,
.bhr-frontend-wrap button.button-primary,
.bhr-frontend-wrap .ts-btn-1,
.bhr-frontend-wrap .ts-btn-primary {
    background: var(--ts-accent-1, var(--e-global-color-primary, #2563eb)) !important;
    color: var(--ts-accent-1-text, #ffffff) !important;
    border-color: var(--ts-accent-1, var(--e-global-color-primary, #2563eb)) !important;
}

.bhr-frontend-wrap .bhr-btn-primary:hover,
.bhr-frontend-wrap button.button-primary:hover,
.bhr-frontend-wrap .ts-btn-1:hover,
.bhr-frontend-wrap .ts-btn-primary:hover {
    background: var(--ts-accent-2, var(--e-global-color-accent, #1d4ed8)) !important;
    border-color: var(--ts-accent-2, var(--e-global-color-accent, #1d4ed8)) !important;
    color: #ffffff !important;
}

.bhr-frontend-wrap .ts-btn-2 {
    background: var(--ts-card-bg, #ffffff) !important;
    color: var(--ts-text-color, #1e293b) !important;
    border-color: var(--ts-border-color, #cbd5e1) !important;
}

.bhr-frontend-wrap .ts-btn-2:hover {
    background: var(--ts-bg-hover, #f1f5f9) !important;
}

/* Loading */
.bhr-frontend-wrap #bhr-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 15px;
    color: var(--ts-text-color, #334155);
    font-weight: 500;
}

/* Results */
.bhr-frontend-wrap #bhr-results {
    margin-top: 24px;
}

.bhr-frontend-wrap .bhr-result-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ts-text-color, #0f172a);
}

.bhr-frontend-wrap .bhr-match-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--ts-card-bg, #ffffff);
    border: 1px solid var(--ts-border-color, #e2e8f0);
    border-radius: var(--ts-radius, 14px);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.bhr-frontend-wrap .bhr-match-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bhr-frontend-wrap .bhr-match-thumb {
    width: 100px;
    height: 100px;
    border-radius: var(--ts-radius, 12px);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ts-bg-color, #f1f5f9);
}

.bhr-frontend-wrap .bhr-match-thumb-placeholder {
    width: 100px;
    height: 100px;
    border-radius: var(--ts-radius, 12px);
    background: var(--ts-bg-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ts-text-muted, #64748b);
    font-size: 36px;
    flex-shrink: 0;
}

.bhr-frontend-wrap .bhr-match-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.bhr-frontend-wrap .bhr-match-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--ts-text-color, #0f172a);
}

.bhr-frontend-wrap .bhr-match-pct {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.bhr-frontend-wrap .bhr-auto   .bhr-match-pct { color: #16a34a; }
.bhr-frontend-wrap .bhr-review .bhr-match-pct { color: #d97706; }

.bhr-frontend-wrap .bhr-match-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bhr-frontend-wrap .bhr-match-actions .button,
.bhr-frontend-wrap .bhr-match-actions .bhr-btn,
.bhr-frontend-wrap .bhr-match-actions .ts-btn,
.bhr-frontend-wrap .bhr-match-actions a {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 15px;
    display: inline-flex;
}

/* No match */
.bhr-frontend-wrap .bhr-no-match {
    text-align: center;
    padding: 36px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--ts-radius, 12px);
}
.bhr-frontend-wrap .bhr-no-match p { font-size: 16px; color: var(--ts-text-color, #475569); margin: 8px 0; }

/* Note Modal */
.bhr-frontend-wrap #bhr-note-modal,
#bhr-note-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.bhr-modal-inner {
    background: var(--ts-card-bg, #ffffff);
    border-radius: var(--ts-radius, 14px);
    padding: 28px;
    width: 480px;
    max-width: 92vw;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    font-family: var(--ts-font-family, inherit);
}

.bhr-modal-inner h2 { margin-top: 0; font-size: 20px; color: var(--ts-text-color, #0f172a); }
.bhr-modal-inner textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 12px;
    border: 1px solid var(--ts-border-color, #cbd5e1);
    border-radius: var(--ts-btn-radius, var(--ts-radius, 8px));
    resize: vertical;
    outline: none;
    background: var(--ts-card-bg, #ffffff);
    color: var(--ts-text-color, #0f172a);
    font-family: inherit;
}
.bhr-modal-inner textarea:focus { border-color: var(--ts-accent-1, #2563eb); }
.bhr-modal-actions { margin-top: 16px; display: flex; gap: 10px; }
