/* Face Recognition Scanner & Enrollment Styles */

/* Face Scanner Overlay (Login & Modal) */
.face-scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Viewport Kamera */
.face-scanner-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    max-height: 70vh;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror selfie camera */
}

.face-scanner-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
    pointer-events: none;
}

/* Face Guide Oval */
.face-guide-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.face-guide-oval {
    width: 65%;
    height: 68%;
    border-radius: 50% / 45%;
    border: 3px dashed rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), inset 0 0 25px rgba(56, 189, 248, 0.2);
    position: relative;
    transition: all 0.35s ease;
    animation: faceOvalBreath 3s infinite ease-in-out;
}

.face-guide-oval.detected {
    border: 3px solid #10b981;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.5), inset 0 0 25px rgba(16, 185, 129, 0.3);
    animation: none;
}

.face-guide-oval.verifying {
    border: 3px solid #3b82f6;
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.6), inset 0 0 25px rgba(59, 130, 246, 0.35);
}

.face-guide-oval.error {
    border: 3px solid #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

/* Laser Scan Line Animation */
.face-scanner-laser {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, #60a5fa, transparent);
    box-shadow: 0 0 15px #38bdf8;
    border-radius: 50%;
    opacity: 0.85;
    animation: faceLaserScan 2.4s infinite ease-in-out;
    pointer-events: none;
}

@keyframes faceLaserScan {
    0% { top: 18%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 78%; opacity: 0; }
}

@keyframes faceOvalBreath {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.02); opacity: 1; }
}

/* Status Info Header */
.face-scanner-info {
    position: absolute;
    top: 2rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 500;
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.face-scanner-info i {
    font-size: 1.25rem;
    color: #38bdf8;
}

/* Bottom Controls */
.face-scanner-actions {
    position: absolute;
    bottom: 2rem;
    display: flex;
    gap: 0.85rem;
    z-index: 10;
    align-items: center;
}

/* Biometric Profile Card (Dalam Modal Pengaturan Akun) */
.biometric-profile-section {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    background: var(--card-bg-subtle, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    transition: all 0.25s ease;
}

.dark .biometric-profile-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.biometric-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.biometric-profile-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color, #1e293b);
}

.biometric-profile-title i {
    font-size: 1.35rem;
    color: var(--primary-color, #3b82f6);
}

.biometric-status-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.biometric-status-pill.is-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.biometric-status-pill.is-empty {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-color-light, #64748b);
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.biometric-profile-desc {
    font-size: 0.82rem;
    color: var(--text-color-light, #64748b);
    line-height: 1.45;
    margin-bottom: 0.85rem;
}

.biometric-profile-btns {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.biometric-profile-btns .btn {
    font-size: 0.84rem;
    padding: 0.45rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Enrollment Progress Bar */
.face-enroll-progress {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    height: 6px;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.85rem;
    position: relative;
}

.face-enroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #10b981);
    transition: width 0.3s ease;
}
