/* public/one-on-one.css — Giao diện iPhone cho Phòng tương tác 1-1 (phòng chờ + trong phòng).
   Prefix .oo- để không đụng CSS khác. Dùng chung cho Cổng học viên (index.html) và bảng điều khiển host. */

.oo-overlay { position: fixed; inset: 0; z-index: 400; display: none; background: rgba(28, 24, 16, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.oo-overlay.open { display: block; }
.oo-sheet { max-width: 520px; margin: 4vh auto; background: linear-gradient(180deg, #fffdf8, #f7f1e4);
  border-radius: 26px; box-shadow: 0 30px 70px -20px rgba(60, 45, 20, .6); padding: 20px 18px 26px; position: relative; }
.oo-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .06); color: #6b5f45; font-size: 1.1rem; cursor: pointer; }
.oo-title { font-weight: 800; font-size: 1.28rem; color: #4a3f22; letter-spacing: -.3px; text-align: center; margin: 2px 0 2px; }
.oo-sub { text-align: center; color: #8a7f63; font-size: .9rem; margin-bottom: 16px; }

/* --- Phòng chờ: số thứ tự khổng lồ + vòng tiến trình --- */
.oo-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 16px; }
.oo-ring { position: relative; width: 176px; height: 176px; }
.oo-ring svg { transform: rotate(-90deg); }
.oo-ring .oo-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.oo-ring .oo-num b { font-size: 3.4rem; font-weight: 800; color: #3d7a2e; line-height: 1; letter-spacing: -2px; }
.oo-ring .oo-num span { font-size: .72rem; color: #8a7f63; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.oo-eta { text-align: center; font-size: 1.02rem; color: #4a3f22; font-weight: 700; }
.oo-eta .oo-mins { color: #d08a1a; }
.oo-hostcount { display: inline-flex; align-items: center; gap: 6px; background: #eef4e6; color: #3d7a2e; font-weight: 700;
  font-size: .82rem; padding: 5px 12px; border-radius: 999px; margin-top: 4px; }

/* --- Nút hành động lớn --- */
.oo-btn { width: 100%; padding: 15px; border: none; border-radius: 16px; font-weight: 800; font-size: 1.06rem; cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(61, 122, 46, .7); transition: transform .12s, filter .12s; }
.oo-btn:active { transform: scale(.96); }
.oo-btn.join { background: linear-gradient(135deg, #5a9f3c, #3d7a2e); color: #fff; }
.oo-btn.leave { background: #f1e7d4; color: #a05a2a; box-shadow: none; }
.oo-btn.enter { background: linear-gradient(135deg, #e8a020, #d0791a); color: #fff; box-shadow: 0 10px 22px -10px rgba(208, 121, 26, .7); }
.oo-btn[disabled] { filter: grayscale(.5) opacity(.6); cursor: default; }

/* --- Bảng điện tử hàng đợi --- */
.oo-queue { margin-top: 16px; }
.oo-queue-h { font-size: .78rem; font-weight: 800; color: #9a8f70; text-transform: uppercase; letter-spacing: 1px; margin: 0 6px 8px; }
.oo-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 14px; margin-bottom: 6px; background: #fffdf7; border: 1px solid #efe6d2; transition: background .25s; }
.oo-row.me { border-color: #7fbf5f; background: linear-gradient(135deg, #f2f9ec, #eaf5e0); box-shadow: 0 3px 10px -5px rgba(61, 122, 46, .5); }
.oo-row.active { border-color: #e8a020; background: linear-gradient(135deg, #fff7e6, #fdeecf); }
.oo-row.done { opacity: .5; }
.oo-idx { width: 24px; text-align: center; font-weight: 800; color: #9a8f70; flex-shrink: 0; }
.oo-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.oo-av.ph { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #d8a33d, #a9c17c); }
.oo-row .nm { flex: 1; min-width: 0; font-weight: 700; color: #4a3f22; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oo-dot { width: 9px; height: 9px; border-radius: 50%; background: #e8a020; flex-shrink: 0; box-shadow: 0 0 0 0 rgba(232, 160, 32, .6); animation: ooPulse 1.4s infinite; }
@keyframes ooPulse { 0% { box-shadow: 0 0 0 0 rgba(232, 160, 32, .55); } 70% { box-shadow: 0 0 0 9px rgba(232, 160, 32, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 160, 32, 0); } }
.oo-tag { font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.oo-tag.me { background: #3d7a2e; color: #fff; }
.oo-tag.active { background: #e8a020; color: #fff; }

/* --- Trong phòng (FaceTime) --- */
/* z-index 950: PHẢI trên thanh tab đáy của Cổng học viên (#tabbar, z 900 — index.html). Ở 500 thì thanh
   tab đè lên hàng nút 📷🎙️📵, học viên đang gọi không tắt mic/kết thúc được (phát hiện 29/9/2026). */
.oo-room { position: fixed; inset: 0; z-index: 950; background: #14110b; display: none; flex-direction: column; }
/* Nút nổi 🧭 "Hướng dẫn" (z 8500) đứng sát nút 📝 Ghi chú góc dưới-trái của phòng gặp GVCN — ẩn trong lúc
   gọi để học viên lớn tuổi khỏi bấm nhầm. Trình duyệt cũ không hiểu :has thì nút vẫn hiện như trước. */
body:has(.oo-room.open) #tnhd-nut-noi { display: none !important; }
.oo-room.open { display: flex; }
.oo-stage { position: relative; flex: 1; overflow: hidden; }
.oo-remote { width: 100%; height: 100%; object-fit: cover; background: #14110b; }
.oo-remote-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #cbb98f; }
.oo-remote-ph .oo-av { width: 96px; height: 96px; }
.oo-local { position: absolute; right: 14px; bottom: 96px; width: 108px; height: 148px; border-radius: 16px; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 20px rgba(0, 0, 0, .5); background: #000; transform: scaleX(-1); }
.oo-timer { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, .5); color: #fff; font-weight: 800; font-size: 1.3rem; padding: 8px 18px; border-radius: 999px; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.oo-timer.warn { background: rgba(216, 138, 26, .85); }
.oo-timer.danger { background: rgba(200, 50, 40, .9); animation: ooShake .5s infinite; }
@keyframes ooShake { 0%,100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 3px)); } 75% { transform: translateX(calc(-50% + 3px)); } }
.oo-toplabel { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: .95rem;
  background: rgba(0, 0, 0, .4); padding: 5px 14px; border-radius: 999px; max-width: 90%; text-align: center; }
.oo-status { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .86rem;
  background: rgba(0, 0, 0, .45); padding: 6px 14px; border-radius: 999px; }
.oo-status.error { background: rgba(200, 50, 40, .85); }
.oo-status.ok { background: rgba(61, 122, 46, .85); }
.oo-quality { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 5px; color: #fff; font-size: .78rem;
  background: rgba(0, 0, 0, .4); padding: 5px 10px; border-radius: 999px; }
.oo-quality i { width: 9px; height: 9px; border-radius: 50%; background: #5ada6a; }
.oo-quality.warn i { background: #e8c020; } .oo-quality.bad i { background: #e05545; }
.oo-recdot { position: absolute; top: 52px; right: 14px; display: flex; align-items: center; gap: 6px; color: #fff; font-size: .74rem;
  background: rgba(0, 0, 0, .4); padding: 4px 10px; border-radius: 999px; }
.oo-recdot i { width: 8px; height: 8px; border-radius: 50%; background: #e0453a; animation: ooPulse 1.4s infinite; }

/* --- Thanh điều khiển dưới cùng --- */
.oo-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .35); }
.oo-cbtn { width: 56px; height: 56px; border-radius: 50%; border: none; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); color: #fff; transition: transform .12s; }
.oo-cbtn:active { transform: scale(.92); }
.oo-cbtn.off { background: #fff; color: #14110b; }
.oo-cbtn.end { background: #e0453a; color: #fff; }
.oo-cbtn.wide { width: auto; padding: 0 20px; border-radius: 28px; font-size: .96rem; font-weight: 800; gap: 6px; }
.oo-cbtn.host { background: rgba(232, 160, 32, .85); }

/* --- Bảng host (giáo viên/trợ giảng) --- */
.oo-hostgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.oo-hcard { background: #fffdf7; border: 1px solid #efe6d2; border-radius: 16px; padding: 12px 14px; }
.oo-hcard .hh { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #4a3f22; margin-bottom: 8px; }
.oo-pill { font-size: .74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.oo-pill.open { background: #eaf5e0; color: #3d7a2e; } .oo-pill.pending { background: #f3ecd9; color: #9a7a2a; } .oo-pill.closed { background: #f1e3e0; color: #a0453a; }
.oo-hosts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.oo-hosts .hchip { display: inline-flex; align-items: center; gap: 5px; background: #eef4e6; color: #3d7a2e; font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.oo-mini { font-size: .8rem; color: #8a7f63; }

@media (max-width: 600px) {
  .oo-sheet { margin: 0; min-height: 100%; border-radius: 0; }
  .oo-local { width: 92px; height: 126px; bottom: 90px; }
}
