/* ==========================================================================
   VIDEO CONSULTATION ROOM STYLESHEET
   State-of-the-art interactive Telehealth suite with WebRTC controls
   ========================================================================== */

.video-consult-container {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  max-height: 850px;
  position: relative;
}

.video-consult-header {
  background: rgba(15, 23, 42, 0.95);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.meeting-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meeting-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.meeting-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-soft 1.5s infinite;
}

.meeting-timer {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
}

/* Video Stage Area */
.video-stage-grid {
  display: flex;
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.video-main-display {
  flex-grow: 1;
  position: relative;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-avatar-fallback {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(2, 132, 199, 0.4);
}

.stream-overlay-label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

/* Self PIP (Picture in Picture) Video */
.pip-video-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 220px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  background: #1e293b;
  z-index: 10;
  transition: all var(--transition-normal);
}

.pip-video-wrap:hover {
  transform: scale(1.04);
}

.pip-avatar-fallback {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #3b82f6;
  margin: 40px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
}

/* Side Drawers: Chat and Prescription */
.video-side-drawer {
  width: 340px;
  background: #ffffff;
  color: #0f172a;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-fast);
  z-index: 15;
}

.video-side-drawer.hidden {
  display: none;
}

.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.drawer-tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-subtle);
  border-bottom: 2px solid transparent;
}

.drawer-tab.active {
  background: #ffffff;
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* In-Call Chat */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 250px;
  max-height: 380px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--primary-light);
  color: var(--primary-hover);
  border-bottom-right-radius: 2px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg-subtle);
  color: var(--text-body);
  border-bottom-left-radius: 2px;
}

.chat-bubble-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-align: right;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Doctor's Prescription Pad */
.prescription-pad {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prescription-pad label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Bottom Floating Controls Bar */
.video-controls-bar {
  background: rgba(15, 23, 42, 0.95);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.control-circle-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.control-circle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.control-circle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.control-circle-btn.muted, .control-circle-btn.danger {
  background: #ef4444;
  border-color: #ef4444;
}

.btn-end-call {
  background: #dc2626;
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-end-call:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}
