/* ── Face Recognition Styles ── */

.eam-face-setup-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}
.eam-face-setup-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}
.eam-face-setup-card p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}
.eam-face-registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d1fae5;
    color: #065f46;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
#eam-face-video-wrap {
    display: none;
    margin: 12px auto;
    width: 320px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #6366f1;
    box-sizing: border-box;
}
#eam-face-video {
    width: 100%;
    display: block;
    transform: scaleX(-1); /* Mirror */
}
#eam-face-status {
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
    margin: 10px 0;
    white-space: pre-line;
}
.eam-face-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin: 4px;
    transition: opacity 0.2s;
}
.eam-face-btn:hover { opacity: 0.88; }
.eam-face-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.eam-face-btn-capture {
    background: linear-gradient(135deg, #10b981, #059669);
    display: none;
}
.eam-face-btn-checkout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Face scan overlay */
#eam-face-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(30,27,75,.85), rgba(0,0,0,.88));
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#eam-face-overlay.active { display: flex; }
#eam-face-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .15s ease;
}
#eam-face-overlay-close:hover { background: rgba(255,255,255,.22); transform: scale(1.06); }
#eam-face-overlay-close:active { transform: scale(0.96); }

#eam-face-overlay-video-wrap {
    position: relative;
    width: min(360px, 88vw, 58vh);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2ff;
    box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.5);
}
#eam-face-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
    background: #000;
}
.eam-face-overlay-label {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-top: 22px;
    text-align: center;
    padding: 0 20px;
}
.eam-face-scan-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}
.eam-face-scan-ring:not(.eam-face-scan-ring-dash) {
    border: 3px solid rgba(139,92,246,.6);
    animation: eam-face-pulse 1.8s ease-in-out infinite;
}
@keyframes eam-face-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,.4); }
    50%      { box-shadow: 0 0 0 10px rgba(139,92,246,0); }
}
.eam-face-scan-ring-dash {
    inset: -8px;
    border: 3px dashed rgba(99,102,241,.65);
    animation: eam-spin 3.2s linear infinite;
}
@keyframes eam-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
