/* ==============================================
   Bright Top Exam System v4 — Front CSS
   ============================================== */
*,*::before,*::after{box-sizing:border-box}

/* ── Wrapper & Card ── */
.bte-wrap{font-family:'Segoe UI',Tahoma,Arial,sans-serif;direction:rtl;max-width:540px;margin:0 auto;padding:16px}
.bte-card{background:#fff;border-radius:20px;padding:36px 32px;box-shadow:0 8px 40px rgba(30,45,107,.12);border:1px solid #e8ecf7}
.bte-card h2{color:#1E2D6B;font-size:22px;margin:0 0 6px;font-weight:700}
.bte-card p{color:#64748b;font-size:14px;margin:0 0 22px;line-height:1.7}

/* ── Logo block (frontend) ── */
.bte-logo-block{text-align:center;margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid #f1f5f9}
.bte-logo-img{height:90px;display:block;margin:0 auto 10px}
.bte-logo-sub{font-size:12px;color:#94a3b8;font-weight:500;letter-spacing:.5px}

/* ── Form ── */
.bte-form{margin-top:4px}
.bte-field{margin-bottom:18px}
.bte-field label{display:block;font-weight:600;color:#1E2D6B;font-size:14px;margin-bottom:7px}
.bte-req{color:#dc2626}
.bte-field input,.bte-field select{width:100%;padding:13px 14px;border:1.5px solid #dde3f0;border-radius:10px;font-size:15px;color:#1E2D6B;background:#f7f9ff;transition:border-color .15s,box-shadow .15s;font-family:inherit}
.bte-field input:focus,.bte-field select:focus{outline:none;border-color:#1E2D6B;box-shadow:0 0 0 3px rgba(30,45,107,.08);background:#fff}

/* ── Buttons ── */
.bte-btn-primary{width:100%;padding:15px;background:#1E2D6B;color:#fff;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;transition:background .15s,transform .1s;display:flex;align-items:center;justify-content:center;gap:8px}
.bte-btn-primary:hover{background:#26388a}
.bte-btn-primary:active{transform:scale(.98)}
.bte-btn-lg{padding:17px;font-size:17px}

/* ── Alerts ── */
.bte-alert{padding:14px 16px;border-radius:10px;font-size:14px;margin-bottom:20px;line-height:1.6}
.bte-alert-ok{background:#f0fdf4;color:#166534;border:1px solid #86efac}
.bte-alert-warn{background:#fefce8;color:#92400e;border:1px solid #fde68a}
.bte-alert-err{background:#fff1f2;color:#be123c;border:1px solid #fecdd3}

/* ── Result card ── */
.bte-result-card{text-align:center;padding:40px 32px}
.bte-result-emoji{font-size:72px;line-height:1;margin:16px 0}
.bte-result-card h2{font-size:24px;margin-bottom:8px}
.bte-result-score{font-size:72px;font-weight:900;line-height:1;margin:16px 0}

/* ═══════════════════════════════════════════
   CAMERA PERMISSION SCREEN
═══════════════════════════════════════════ */
#bte-exam-page{font-family:'Segoe UI',Tahoma,Arial,sans-serif;direction:rtl;background:#EEF1F8;min-height:100vh}

#bte-cam-screen{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px}
.bte-cam-prompt-card{background:#fff;border-radius:24px;padding:48px 40px;text-align:center;max-width:520px;width:100%;box-shadow:0 10px 50px rgba(30,45,107,.15)}
.bte-cam-prompt-card .bte-logo-block{margin-bottom:20px;padding-bottom:20px}
.bte-cam-icon{font-size:60px;line-height:1;margin:8px 0 16px}
.bte-cam-prompt-card h2{color:#1E2D6B;font-size:22px;margin:0 0 10px;font-weight:700}
.bte-cam-prompt-card p{color:#64748b;font-size:14px;line-height:1.7;margin-bottom:20px}
.bte-exam-meta{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-bottom:28px}
.bte-exam-meta span{background:#EEF1F8;color:#1E2D6B;font-weight:600;font-size:13px;padding:7px 16px;border-radius:20px}

/* ═══════════════════════════════════════════
   EXAM HEADER
═══════════════════════════════════════════ */
#bte-exam-hdr{position:sticky;top:0;z-index:500;background:#1E2D6B;padding:10px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 12px rgba(0,0,0,.25)}
.bte-hdr-left{display:flex;align-items:center;gap:12px}
.bte-hdr-logo{height:42px;display:block}
.bte-hdr-info strong{color:#fff;font-size:15px;display:block;line-height:1.3}
.bte-hdr-info small{color:rgba(255,255,255,.5);font-size:12px}

#bte-timer-wrap{text-align:center}
.bte-timer-label{color:rgba(255,255,255,.5);font-size:10px;letter-spacing:.5px;text-transform:uppercase;margin-bottom:2px}
#bte-timer{color:#fff;font-size:26px;font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:3px;background:rgba(0,0,0,.25);padding:6px 18px;border-radius:8px;display:block}
#bte-timer.bte-timer-red{color:#fca5a5;background:rgba(220,38,38,.3)}

/* ═══════════════════════════════════════════
   FLOATING CAMERA
═══════════════════════════════════════════ */
#bte-cam-float{position:fixed;bottom:20px;left:20px;width:180px;background:#000;border-radius:14px;overflow:hidden;border:2.5px solid #B8860B;z-index:999;box-shadow:0 6px 24px rgba(0,0,0,.5)}
#bte-video{width:100%;height:135px;object-fit:cover;display:block}
.bte-cam-live-badge{background:#15803d;color:#fff;font-size:11px;font-weight:700;padding:4px 10px;display:flex;align-items:center;gap:5px;justify-content:center}
.bte-live-dot{width:7px;height:7px;background:#fff;border-radius:50%;animation:bte-pulse 1s infinite}
@keyframes bte-pulse{0%,100%{opacity:1}50%{opacity:.3}}

/* ═══════════════════════════════════════════
   QUESTIONS
═══════════════════════════════════════════ */
#bte-q-container{max-width:800px;margin:0 auto;padding:24px 20px 80px}

.bte-qcard{background:#fff;border-radius:16px;padding:22px 24px;margin-bottom:16px;border:2px solid #e8ecf7;transition:border-color .2s,box-shadow .2s}
.bte-qcard.bte-qcard-answered{border-color:rgba(184,134,11,.4);box-shadow:0 2px 12px rgba(184,134,11,.08)}

.bte-qhead{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}
.bte-qnum{background:#1E2D6B;color:#B8860B;font-weight:800;font-size:12px;padding:4px 12px;border-radius:20px;white-space:nowrap;flex-shrink:0;margin-top:3px}
.bte-qtext{font-weight:700;color:#1E2D6B;font-size:15px;line-height:1.65}

.bte-opts{display:flex;flex-direction:column;gap:8px}
.bte-opt{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:9px;cursor:pointer;border:1.5px solid #e8ecf7;font-size:14px;color:#374151;transition:all .12s;user-select:none}
.bte-opt:hover{background:#f5f7ff;border-color:#c7d0ef}
.bte-opt:has(input:checked){background:#FEF9EE;border-color:#B8860B}
.bte-opt input[type=radio]{accent-color:#1E2D6B;width:17px;height:17px;flex-shrink:0;cursor:pointer}
.bte-opt-ltr{background:#EEF1F8;color:#1E2D6B;font-weight:800;font-size:12px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:8px;flex-shrink:0}
.bte-opt-text{flex:1;line-height:1.4}

/* ── Submit zone ── */
.bte-submit-zone{background:#fff;border-radius:16px;padding:28px;text-align:center;border:2px solid #fde68a;margin-top:8px}
.bte-submit-warn{color:#92400e;font-size:14px;margin:0 0 16px}

#bte-progress-bar-wrap{background:#f1f5f9;border-radius:8px;height:8px;overflow:hidden;margin-bottom:8px}
#bte-progress-bar{height:100%;background:linear-gradient(90deg,#1E2D6B,#B8860B);border-radius:8px;width:0;transition:width .3s}

#bte-progress-text{font-size:13px;color:#64748b;margin-bottom:16px;font-weight:500}

.bte-btn-submit{padding:15px 52px;background:#94a3b8;color:#fff;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:not-allowed;font-family:inherit;transition:all .2s}
.bte-btn-submit.bte-btn-ready{background:#15803d;cursor:pointer;box-shadow:0 4px 16px rgba(21,128,61,.3)}
.bte-btn-submit.bte-btn-ready:hover{background:#166534;transform:translateY(-1px)}
.bte-btn-submit.bte-btn-ready:active{transform:translateY(0)}
