/* ==========================================================================
   Zoom 1:1 Web Client Dark Mode Theme
   Faithfully reproduces zoom.us/join layout and visual styling
   ========================================================================== */

:root {
  --zoom-bg: #12161A;
  --zoom-bg-alt: #161A20;
  --zoom-card-bg: #181C22;
  --zoom-input-bg: #181C22;
  --zoom-input-border: #333946;
  --zoom-input-border-focus: #0E71EB;
  --zoom-text-primary: #FFFFFF;
  --zoom-text-secondary: #8F97A3;
  --zoom-text-label: #CBD2DE;
  --zoom-text-muted: #5A6474;
  --zoom-blue: #0E71EB;
  --zoom-blue-hover: #0B5CFF;
  --zoom-blue-active: #004FD6;
  --zoom-blue-light: #2D8CFF;
  --zoom-blue-badge: rgba(14, 113, 235, 0.15);
  --zoom-btn-disabled-bg: #242933;
  --zoom-btn-disabled-text: #616B7B;
  --zoom-border-subtle: #2A303C;
  --zoom-modal-bg: #1A1F27;
  --zoom-modal-header: #212732;
  --zoom-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 20px 50px rgba(0, 0, 0, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--zoom-bg);
  color: var(--zoom-text-primary);
  font-family: var(--zoom-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header Navigation Bar
   ========================================================================== */

.zoom-header {
  height: 64px;
  width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--zoom-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 50;
}

.zoom-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.zoom-logo-svg {
  height: 28px;
  width: auto;
  fill: var(--zoom-blue);
  transition: opacity 0.2s;
}

.zoom-logo-svg:hover {
  opacity: 0.9;
}

.zoom-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: #D2D6DC;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-link:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.06);
}

.btn-sign-up {
  background-color: var(--zoom-blue);
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  line-height: 1.2;
}

.btn-sign-up:hover {
  background-color: var(--zoom-blue-hover);
  box-shadow: 0 4px 12px rgba(14, 113, 235, 0.3);
}

.btn-sign-up:active {
  background-color: var(--zoom-blue-active);
  transform: scale(0.98);
}

/* User Account Pill (When Signed In) */
.user-account-badge {
  display: none;
  align-items: center;
  gap: 10px;
  background-color: var(--zoom-card-bg);
  border: 1px solid var(--zoom-border-subtle);
  padding: 4px 14px 4px 6px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.user-account-badge:hover {
  border-color: var(--zoom-blue);
  background-color: #202630;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E71EB, #8B5CF6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-display-name {
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Main Center Stage / Join Card
   ========================================================================== */

.zoom-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
  position: relative;
  width: 100%;
}

.join-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.join-title {
  font-size: 32px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
  text-align: center;
}

.join-form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--zoom-text-label);
  margin-bottom: 8px;
  text-align: left;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.join-input {
  width: 100%;
  height: 48px;
  background-color: var(--zoom-input-bg);
  border: 1px solid var(--zoom-input-border);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.join-input::placeholder {
  color: var(--zoom-text-muted);
}

.join-input:focus {
  border-color: var(--zoom-input-border-focus);
  box-shadow: 0 0 0 2px rgba(14, 113, 235, 0.25);
  background-color: #1A1F27;
}

.join-terms {
  font-size: 13px;
  color: var(--zoom-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
  text-align: left;
}

.zoom-link {
  color: var(--zoom-blue-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s, text-decoration 0.15s;
}

.zoom-link:hover {
  text-decoration: underline;
  color: #63A8FF;
}

.btn-join {
  width: 100%;
  height: 46px;
  background-color: var(--zoom-btn-disabled-bg);
  color: var(--zoom-btn-disabled-text);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.btn-join.active {
  background-color: var(--zoom-blue);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14, 113, 235, 0.35);
}

.btn-join.active:hover {
  background-color: var(--zoom-blue-hover);
  box-shadow: 0 6px 18px rgba(14, 113, 235, 0.45);
}

.btn-join.active:active {
  background-color: var(--zoom-blue-active);
  transform: scale(0.99);
}

.sip-room-link-container {
  margin-top: 36px;
  text-align: center;
}

.sip-link {
  font-size: 14px;
  color: var(--zoom-blue-light);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.sip-link:hover {
  text-decoration: underline;
  color: #63A8FF;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.zoom-footer {
  width: 100%;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--zoom-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--zoom-text-secondary);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: var(--zoom-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.footer-legal-link:hover {
  color: #CBD2DE;
  text-decoration: underline;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  margin-right: 60px; /* Room for chat bubble */
}

.lang-selector-btn {
  background: transparent;
  border: none;
  color: var(--zoom-text-secondary);
  font-size: 13px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.lang-selector-btn:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Language Dropdown Menu */
.lang-menu {
  position: absolute;
  bottom: 40px;
  right: 0;
  background-color: var(--zoom-card-bg);
  border: 1px solid var(--zoom-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  width: 160px;
  padding: 6px 0;
  display: none;
  flex-direction: column;
  z-index: 60;
}

.lang-menu.show {
  display: flex;
}

.lang-option {
  padding: 8px 16px;
  font-size: 13px;
  color: #CBD2DE;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
  background-color: rgba(14, 113, 235, 0.15);
  color: #FFFFFF;
}

.lang-option.active {
  color: var(--zoom-blue-light);
  font-weight: 600;
}

/* ==========================================================================
   Floating Support Chat Bubble (Bottom Right)
   ========================================================================== */

.zoom-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--zoom-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
  outline: none;
}

.zoom-chat-widget:hover {
  background-color: var(--zoom-blue-hover);
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(14, 113, 235, 0.4);
}

.zoom-chat-widget:active {
  transform: scale(0.96);
}

.chat-bubble-icon {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
}

/* ==========================================================================
   Modals & Overlays (Zoom Dark Theme)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.zoom-modal {
  background-color: var(--zoom-modal-bg);
  border: 1px solid var(--zoom-border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  background-color: var(--zoom-modal-header);
  border-bottom: 1px solid var(--zoom-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--zoom-text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.modal-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--zoom-border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--zoom-card-bg);
}

/* Tabs inside Modal */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--zoom-border-subtle);
  margin-bottom: 20px;
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--zoom-text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.modal-tab-btn:hover {
  color: #FFFFFF;
}

.modal-tab-btn.active {
  color: var(--zoom-blue-light);
  font-weight: 600;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--zoom-blue);
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--zoom-text-label);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  height: 42px;
  background-color: var(--zoom-input-bg);
  border: 1px solid var(--zoom-input-border);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--zoom-blue);
  box-shadow: 0 0 0 2px rgba(14, 113, 235, 0.2);
}

.btn-primary {
  width: 100%;
  height: 44px;
  background-color: var(--zoom-blue);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: var(--zoom-blue-hover);
}

.btn-secondary {
  height: 40px;
  padding: 0 18px;
  background-color: transparent;
  color: #D2D6DC;
  border: 1px solid var(--zoom-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: #4A5568;
}

/* ==========================================================================
   Account & Meeting History Drawer / Dashboard Modal
   ========================================================================== */

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 150;
  display: none;
}

.drawer-overlay.show {
  display: block;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background-color: var(--zoom-modal-bg);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--zoom-border-subtle);
}

.history-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  background-color: var(--zoom-modal-header);
  border-bottom: 1px solid var(--zoom-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E71EB, #9333EA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.drawer-user-meta {
  display: flex;
  flex-direction: column;
}

.drawer-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
}

.drawer-user-status {
  font-size: 12px;
  color: #10B981;
  display: flex;
  align-items: center;
  gap: 5px;
}

.drawer-user-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
}

.drawer-nav-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--zoom-border-subtle);
  background-color: #151921;
}

.drawer-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--zoom-text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.drawer-tab:hover {
  color: #FFFFFF;
}

.drawer-tab.active {
  color: var(--zoom-blue-light);
  border-bottom: 2px solid var(--zoom-blue);
  font-weight: 600;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meeting-item-card {
  background-color: var(--zoom-card-bg);
  border: 1px solid var(--zoom-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, background-color 0.2s;
}

.meeting-item-card:hover {
  border-color: #3F485B;
  background-color: #1E232C;
}

.meeting-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.meeting-name {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
}

.meeting-id-pill {
  font-size: 12px;
  font-family: monospace;
  color: var(--zoom-blue-light);
  background: var(--zoom-blue-badge);
  padding: 3px 8px;
  border-radius: 4px;
}

.meeting-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--zoom-text-secondary);
}

.meeting-status-tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.status-scheduled {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}

.status-past {
  background: rgba(156, 163, 175, 0.15);
  color: #9CA3AF;
}

.status-blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.meeting-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
  margin-top: 4px;
}

.btn-mini-join {
  background-color: var(--zoom-blue);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-mini-join:hover {
  background-color: var(--zoom-blue-hover);
}

.btn-mini-remove {
  background: transparent;
  border: none;
  color: var(--zoom-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s;
}

.btn-mini-remove:hover {
  color: #EF4444;
}

/* ==========================================================================
   Virtual Chat Assistant / Support Drawer
   ========================================================================== */

.chat-assistant-drawer {
  position: fixed;
  bottom: 84px;
  right: 28px;
  width: 360px;
  height: 480px;
  background-color: var(--zoom-modal-bg);
  border: 1px solid var(--zoom-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  z-index: 120;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

.chat-assistant-drawer.open {
  display: flex;
}

.chat-header {
  padding: 14px 18px;
  background-color: var(--zoom-modal-header);
  border-bottom: 1px solid var(--zoom-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.bubble-bot {
  align-self: flex-start;
  background-color: var(--zoom-card-bg);
  color: #E2E8F0;
  border: 1px solid var(--zoom-border-subtle);
  border-bottom-left-radius: 2px;
}

.bubble-user {
  align-self: flex-end;
  background-color: var(--zoom-blue);
  color: #FFFFFF;
  border-bottom-right-radius: 2px;
}

.chat-input-bar {
  padding: 12px;
  border-top: 1px solid var(--zoom-border-subtle);
  background-color: #151921;
  display: flex;
  gap: 8px;
}

.chat-text-input {
  flex: 1;
  height: 38px;
  background: var(--zoom-input-bg);
  border: 1px solid var(--zoom-input-border);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 13px;
  padding: 0 12px;
  outline: none;
}

.chat-text-input:focus {
  border-color: var(--zoom-blue);
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  background: var(--zoom-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.chat-send-btn:hover {
  background: var(--zoom-blue-hover);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 640px) {
  .zoom-header {
    padding: 0 16px;
  }
  
  .zoom-main {
    padding: 30px 16px;
  }
  
  .join-title {
    font-size: 26px;
    margin-bottom: 24px;
  }
  
  .zoom-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 16px;
  }
  
  .footer-right {
    margin-right: 0;
  }
  
  .zoom-chat-widget {
    bottom: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
  }
  
  .chat-assistant-drawer {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 72px;
  }
}
