/* css/video-calls.css */

/* ════════════════════════════════════════════════
   SHARED PAGE SHELL
   ════════════════════════════════════════════════ */
.vc-page {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.vc-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* ════════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════════ */
.vc-landing {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.vc-body {
  flex: 1; overflow-y: auto;
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center;
}

.vc-hero { text-align: center; margin-bottom: 36px; }

.vc-hero-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 16px rgba(99,102,241,0.4));
}

.vc-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px; font-weight: 800;
  margin-bottom: 8px;
}

.vc-hero-sub { font-size: 15px; color: var(--muted); }

/* Buttons */
.vc-primary-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%; height: 58px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none; border-radius: 16px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
  transition: opacity 0.18s, transform 0.15s;
  margin-bottom: 14px;
}

.vc-primary-btn:hover  { opacity: 0.9; transform: translateY(-2px); }
.vc-primary-btn:active { transform: translateY(0); }
.vc-primary-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.vc-secondary-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%; height: 58px;
  background: none;
  border: 2px solid rgba(99,102,241,0.5);
  border-radius: 16px;
  color: #818cf8;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 28px;
}

.vc-secondary-btn:hover { background: rgba(99,102,241,0.08); border-color: #818cf8; }

/* Info card */
.vc-info-card {
  width: 100%;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 16px;
  padding: 16px;
}

.vc-info-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; line-height: 1.5;
  padding: 6px 0;
  color: rgba(147,197,253,0.9);
}

.vc-info-icon { font-size: 16px; flex-shrink: 0; }

/* ════════════════════════════════════════════════
   BOOK CALL SCREEN
   ════════════════════════════════════════════════ */
.bc-section-label {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  margin-bottom: 12px;
}

/* User rows */
.bc-user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.18s;
}

.bc-user-row:hover { background: rgba(255,255,255,0.08); }

.bc-user-selected {
  background: rgba(99,102,241,0.1) !important;
  border-color: #6366f1 !important;
}

.bc-user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  color: #818cf8;
  flex-shrink: 0;
}

.bc-user-info  { flex: 1; min-width: 0; }
.bc-user-name  { font-size: 15px; font-weight: 600; }
.bc-user-sub   { font-size: 12px; color: var(--muted); }

.bc-check {
  width: 24px; height: 24px;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Date/time row */
.bc-divider {
  height: 1px; background: var(--border);
  margin: 20px 0;
}

.bc-datetime-row {
  display: flex; gap: 10px;
}

/* ── Date/time field wrapper ── */
.bc-dt-field {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  transition: border-color 0.18s;
  overflow: hidden;
  /* no position:relative, no cursor:pointer — let the input handle it */
}

.bc-dt-field:focus-within {
  border-color: #6366f1;
  background: rgba(99,102,241,0.07);
}

.bc-dt-field svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── Native date/time input — fully visible, dark-themed ── */
.bc-dt-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  /* Tell the browser to render its chrome in dark mode */
  color-scheme: dark;
}

/* Style the small calendar/clock icon the browser injects */
.bc-dt-input::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.45);
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
}

/* Firefox — the spinner arrows */
.bc-dt-input::-moz-focus-inner { border: 0; }

/* ════════════════════════════════════════════════
   MY BOOKINGS SCREEN
   ════════════════════════════════════════════════ */
.mb-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  transition: background 0.15s;
}

.mb-card:hover { background: rgba(255,255,255,0.07); }

.mb-card-left {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  flex-shrink: 0;
}

.mb-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.mb-card-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.mb-card-body { flex: 1; min-width: 0; }

.mb-card-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mb-card-time { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.mb-card-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.mb-status-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 100px;
  padding: 3px 10px;
}

.mb-role-badge {
  font-size: 11px; color: var(--muted);
}

.mb-more-btn {
  background: none; border: none;
  font-size: 20px; color: var(--muted);
  cursor: pointer; padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.mb-more-btn:hover { background: rgba(255,255,255,0.08); }

/* ════════════════════════════════════════════════
   VIDEO CALL SCREEN
   ════════════════════════════════════════════════ */
.vcall-page {
  position: relative;
  width: 100%; height: 100%;
  background: #000;
  overflow: hidden;
}

/* Remote video fills background */
.vcall-remote {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #111;
}

/* Waiting overlay */
.vcall-waiting {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #0a0a0a;
  z-index: 2;
  gap: 14px;
  padding: 24px;
}

.vcall-waiting-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.vcall-waiting-title {
  color: #fff; font-size: 18px; font-weight: 600;
  text-align: center;
}

.vcall-waiting-sub { color: rgba(255,255,255,0.45); font-size: 13px; }

/* Local pip */
.vcall-local {
  position: absolute;
  top: 16px; right: 16px;
  width: 110px; height: 155px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.6);
  z-index: 10;
  background: #222;
}

/* Controls bar */
.vcall-controls {
  position: absolute;
  bottom: 32px; left: 0; right: 0;
  display: flex; justify-content: center;
  gap: 18px;
  z-index: 10;
}

.vcall-ctrl-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all 0.18s;
}

.vcall-ctrl-btn:hover    { transform: scale(1.1); }
.vcall-ctrl-btn.vcall-ctrl-off { background: #ef4444; }

.vcall-end-btn { background: #ef4444 !important; }

/* Leave overlay */
.vcall-leave-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
}

.vcall-leave-dialog {
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 280px;
  width: 90%;
}

.vcall-leave-dialog h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.vcall-leave-dialog p  { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 22px; }

.vcall-leave-btns {
  display: flex; gap: 10px;
}

.vcall-leave-btns button {
  flex: 1; height: 46px;
  border-radius: 12px; border: none;
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}

.vcall-leave-btns button:first-child {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.vcall-leave-btns button:last-child {
  background: #ef4444;
  color: #fff;
}

.vcall-leave-btns button:hover { opacity: 0.85; }

/* ── Responsive ── */
@media (max-width: 380px) {
  .vcall-local { width: 90px; height: 125px; }
  .vcall-ctrl-btn { width: 50px; height: 50px; font-size: 20px; }
}
/* ════════════════════════════════════════════════
   PERMISSION GATE (shown before getUserMedia)
   ════════════════════════════════════════════════ */
.vcall-gate {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #0a0a18;
  padding: 28px 24px;
  text-align: center;
  z-index: 30;
  gap: 14px;
  overflow-y: auto;
}

.vcall-gate-icon {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(99,102,241,0.5));
}

.vcall-gate-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 900;
  color: #fff;
}

.vcall-gate-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 300px;
}

.vcall-gate-tips {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  max-width: 320px;
  text-align: left;
}

.vcall-gate-tip {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.vcall-gate-btn {
  width: 100%; max-width: 320px;
  height: 56px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none; border-radius: 16px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
  transition: opacity 0.18s, transform 0.15s;
}

.vcall-gate-btn:hover    { opacity: 0.9; transform: translateY(-2px); }
.vcall-gate-btn:active   { transform: translateY(0); }
.vcall-gate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.vcall-gate-back {
  background: none; border: none;
  color: rgba(255,255,255,0.45);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.18s;
}

.vcall-gate-back:hover { color: rgba(255,255,255,0.8); }