/* ================================================
   Google Meet Theme for Jitsi Meet
   ================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== CSS Variables (Google Meet palette + Jitsi overrides) ===== */
:root {
  --gm-bg: #202124;
  --gm-surface: #3c4043;
  --gm-surface-2: #2a2a2d;
  --gm-surface-3: #28292c;
  --gm-primary: #cd766a;
  --gm-primary-hover: #b8605a;
  --gm-danger: #ea4335;
  --gm-danger-hover: #d33828;
  --gm-text: #ffffff;
  --gm-text-secondary: rgba(255, 255, 255, 0.7);
  --gm-text-tertiary: rgba(255, 255, 255, 0.4);
  --gm-radius: 12px;
  --gm-radius-pill: 24px;
  --gm-font: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Override Jitsi's own CSS variables */
  --toolbox-background-color: rgba(32, 33, 36, 0.92);
  --toolbar-badge-background: #cd766a;
  --prejoin-preview-background: #3c4043;
}

/* ===== Global Base ===== */
body,
.new-toolbox,
.toolbox-content,
input, button, select, textarea {
  font-family: var(--gm-font) !important;
}

/* ============================================================
   WELCOME PAGE  –  Google Meet look
   ============================================================ */

body.welcome-page {
  background-color: #ffffff !important;
}

/* ── Full page wrapper ── */
.welcome {
  background-color: #ffffff !important;
  background-image: none !important;
  font-family: var(--gm-font) !important;
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ── Top header / nav bar ── */
.welcome .header {
  background-color: #ffffff !important;
  background-image: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

/* ── Welcome page top bar ── */
#gm-top-bar {
  width: 100%;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  background: #ffffff;
}

.gm-top-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.gm-top-logo-icon {
  width: 32px;
  height: 32px;
  background: #cd766a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gm-top-logo-text {
  font-family: var(--gm-font);
  font-size: 1.25rem;
  font-weight: 500;
  color: #202124;
}

/* ── Logo hidden ── */
.welcome .header-watermark-container,
.welcome-watermark,
.watermark {
  display: none !important;
}

/* keep spacing but remove logo slot */
.welcome .header-watermark-container {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 16px 24px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.welcome .welcome-watermark {
  position: static !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
}

/* Make the watermark SVG bigger */
.welcome .watermark.leftwatermark {
  width: 120px !important;
  height: 36px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  position: static !important;
}

/* Settings button hidden on welcome page */
.welcome .welcome-page-settings {
  display: none !important;
}

/* ── Center content area (hero) ── */
.welcome .header-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 80px 24px 60px !important;
  margin: 0 auto !important;
  max-width: 600px !important;
  width: 100% !important;
}

/* Main headline */
.welcome .header-text-title {
  color: #202124 !important;
  font-family: var(--gm-font) !important;
  font-weight: 400 !important;
  font-size: 3rem !important;
  line-height: 1.2 !important;
  margin-bottom: 12px !important;
  letter-spacing: -0.5px !important;
}

/* Subtitle */
.welcome .header-text-subtitle {
  color: #5f6368 !important;
  font-family: var(--gm-font) !important;
  font-weight: 400 !important;
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
  margin-bottom: 40px !important;
}

/* ── Enter room / join area ── */
#enter_room {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 480px !important;
}

.welcome .join-meeting-container {
  display: flex !important;
  align-items: center !important;
  border-radius: var(--gm-radius-pill) !important;
  background-color: #ffffff !important;
  border: 1px solid #dadce0 !important;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15) !important;
  padding: 4px 4px 4px 8px !important;
  width: 100% !important;
  transition: box-shadow 0.2s !important;
}

.welcome .join-meeting-container:focus-within {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28) !important;
  border-color: transparent !important;
}

.welcome .enter-room-input-container {
  flex: 1 !important;
}

.welcome .enter-room-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: var(--gm-font) !important;
  font-size: 1rem !important;
  color: #202124 !important;
  padding: 8px 12px !important;
  height: 44px !important;
  width: 100% !important;
}

.welcome .enter-room-input::placeholder {
  color: #9aa0a6 !important;
}

/* Join / Start meeting button */
.welcome-page-button {
  background: #cd766a !important;
  border-radius: var(--gm-radius-pill) !important;
  font-family: var(--gm-font) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
  white-space: nowrap !important;
  border: none !important;
  cursor: pointer !important;
  letter-spacing: 0.01em !important;
  transition: background 0.2s, box-shadow 0.2s !important;
  flex-shrink: 0 !important;
}

.welcome-page-button:hover {
  background-color: #b8605a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* ── Hide footer (app download section) ── */
.welcome-footer {
  display: none !important;
}

/* ── Hide the card tabs area (recent meetings, upcoming) for clean look ── */
.welcome-cards-container {
  display: none !important;
}

/* ── Divider between hero and cards ─── */
.welcome-card--blue {
  background: #f5deda !important;
}

/* ── Hide original enter_room (replaced by gm-actions) ── */
#enter_room {
  display: none !important;
}

/* ============================================================
   GOOGLE MEET ACTION ROW  (#gm-actions injected by JS)
   ============================================================ */

#gm-actions {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* ── user chip (top of action area) ── */
#gm-user-chip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--gm-font);
  font-size: 0.875rem;
  color: #5f6368;
}

/* identity sub-row (avatar + name) */
.gm-chip-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* nav buttons sub-row */
.gm-chip-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.gm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #cd766a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.gm-user-name {
  font-weight: 500;
  color: #202124;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-admin-btn {
  background: #cd766a !important;
  color: #fff !important;
  border-color: #cd766a !important;
}
.gm-admin-btn:hover { background: #1558b0 !important; }

.gm-history-btn {
  display: inline-block;
  background: none;
  border: 1px solid #dadce0;
  border-radius: 20px;
  color: #cd766a;
  font-family: var(--gm-font);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 4px 12px;
  text-decoration: none;
  transition: background 0.15s;
}
.gm-history-btn:hover { background: #f5deda; }

.gm-signout-btn {
  background: none;
  border: 1px solid #dadce0;
  border-radius: 20px;
  color: #5f6368;
  font-family: var(--gm-font);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.gm-signout-btn:hover { background: #f1f3f4; }

.gm-signin-btn {
  display: inline-block;
  background: #cd766a;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  padding: 6px 18px;
  font-family: var(--gm-font);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}
.gm-signin-btn:hover { background: #b8605a; }

.gm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* New meeting button */
.gm-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #cd766a;
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 0 20px;
  height: 48px;
  font-family: var(--gm-font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: background 0.2s, box-shadow 0.2s;
}

.gm-new-btn:hover {
  background: #b8605a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* locked state — not signed in */
.gm-new-btn--locked {
  background: #5f6368 !important;
  cursor: pointer !important;
}
.gm-new-btn--locked:hover {
  background: #4a4e52 !important;
  box-shadow: none !important;
}

.gm-new-btn svg {
  flex-shrink: 0;
}

/* Vertical divider between New meeting and code input */
.gm-vdivider {
  width: 1px;
  height: 40px;
  background: #dadce0;
  flex-shrink: 0;
}

/* Wrapper that keeps code-input + Join side-by-side on all screen sizes */
.gm-join-row {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

/* Code / link input wrapper */
.gm-code-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 0 14px;
  height: 48px;
  background: #ffffff;
  flex: 1;
  min-width: 0;
  max-width: 300px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: text;
}

.gm-code-wrap.focused {
  border-color: #cd766a;
  box-shadow: 0 0 0 1px #cd766a;
}

@keyframes gm-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.gm-shake {
  animation: gm-shake 0.5s ease !important;
  border-color: #ea4335 !important;
  box-shadow: 0 0 0 1px #ea4335 !important;
}

.gm-kbd-icon {
  color: #5f6368;
  flex-shrink: 0;
}

#gm-code-input {
  border: none;
  outline: none;
  font-family: var(--gm-font);
  font-size: 0.9375rem;
  color: #202124;
  background: transparent;
  width: 100%;
  min-width: 0;
}

#gm-code-input::placeholder {
  color: #9aa0a6;
}

/* Join button */
.gm-join-btn {
  background: transparent;
  color: #80868b;
  border: none;
  border-radius: 4px;
  height: 48px;
  padding: 0 16px;
  font-family: var(--gm-font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: default;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}

.gm-join-btn:not([disabled]) {
  color: #cd766a;
  cursor: pointer;
}

.gm-join-btn:not([disabled]):hover {
  background: #f5deda;
  border-radius: 4px;
}

/* Create account link below the action row */
.gm-create-link {
  text-align: center;
  font-size: 0.875rem;
  color: #5f6368;
  margin-top: 20px;
  font-family: var(--gm-font);
}

.gm-create-link a {
  color: #cd766a;
  text-decoration: none;
  font-weight: 500;
}

.gm-create-link a:hover {
  text-decoration: underline;
}

/* ============================================================
   NEW MEETING DROPDOWN
   ============================================================ */

#gm-new-dropdown {
  position: absolute;
  z-index: 9999;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.10);
  padding: 8px 0;
  min-width: 300px;
  font-family: var(--gm-font);
  animation: gm-dd-in .12s ease;
}

@keyframes gm-dd-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.gm-dd-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.gm-dd-item:hover {
  background: #f1f3f4;
}

.gm-dd-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gm-dd-icon--link  { background: #f5deda; color: #cd766a; }
.gm-dd-icon--video { background: #fce8e6; color: #ea4335; }

.gm-dd-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gm-dd-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #202124;
}

.gm-dd-sub {
  font-size: 0.8125rem;
  color: #5f6368;
}

/* ============================================================
   MEETING FOR LATER PANEL
   ============================================================ */

#gm-later-panel {
  position: absolute;
  z-index: 9999;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.10);
  padding: 20px;
  width: 340px;
  font-family: var(--gm-font);
  animation: gm-dd-in .12s ease;
}

.gm-later-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #202124;
}

.gm-later-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.gm-later-close:hover { background: #f1f3f4; }

.gm-later-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f3f4;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.gm-later-link-text {
  flex: 1;
  font-size: 0.8125rem;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-later-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #cd766a;
  font-family: var(--gm-font);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.gm-later-copy-btn:hover { background: #f5deda; }

.gm-later-hint {
  font-size: 0.8125rem;
  color: #5f6368;
  line-height: 1.5;
  margin-bottom: 16px;
}

.gm-later-actions {
  display: flex;
  justify-content: flex-end;
}

.gm-later-join-btn {
  background: #cd766a;
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 8px 20px;
  font-family: var(--gm-font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.gm-later-join-btn:hover { background: #b8605a; }

/* ============================================================
   MOBILE — WELCOME PAGE
   ============================================================ */

/* ─── Shared sheet animation ─── */
@keyframes gm-sheet-in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes gm-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}

/* ─── ≤ 640 px  (all phones + small tablets) ─── */
@media (max-width: 640px) {

  /* Top bar */
  #gm-top-bar { padding: 10px 16px !important; }

  /* Hero */
  .welcome .header-container {
    padding: 36px 16px 28px !important;
  }
  .welcome .header-text-title {
    font-size: 2rem !important;
    letter-spacing: -0.3px !important;
  }
  .welcome .header-text-subtitle {
    font-size: 0.9375rem !important;
    margin-bottom: 24px !important;
  }

  /* Action area */
  #gm-actions { padding: 0 !important; }

  /* ── User chip: avatar+name on top, nav buttons below ── */
  #gm-user-chip {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }

  .gm-chip-identity {
    gap: 8px !important;
  }

  .gm-chip-nav {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* Bigger touch targets on nav buttons (min 44px) */
  .gm-history-btn,
  .gm-signout-btn {
    min-height: 36px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Sign-in button for logged-out state */
  .gm-signin-btn {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 20px !important;
  }

  /* ── Action row: new-meeting full-width, code+join stay paired ── */
  .gm-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .gm-vdivider { display: none !important; }

  .gm-new-btn {
    width: 100% !important;
    justify-content: center !important;
    height: 52px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
  }

  /* gm-join-row keeps code-wrap + join side-by-side */
  .gm-join-row {
    width: 100% !important;
    border: 1px solid #dadce0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .gm-code-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 52px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 12px !important;
  }

  /* remove double border on focus — outer join-row shows it instead */
  .gm-code-wrap.focused {
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .gm-join-row:focus-within {
    border-color: #cd766a !important;
    box-shadow: 0 0 0 1px #cd766a !important;
  }

  #gm-code-input { font-size: 1rem !important; }

  .gm-join-btn {
    height: 52px !important;
    padding: 0 16px !important;
    font-size: 1rem !important;
  }

  /* ── Dropdown: bottom sheet ── */
  #gm-new-dropdown {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 8px 0 calc(16px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,.18) !important;
    animation: gm-sheet-in .2s cubic-bezier(.2,.8,.4,1) !important;
    z-index: 9999 !important;
  }

  #gm-new-dropdown::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #dadce0;
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  #gm-new-dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 9998;
    animation: gm-fade-in .2s ease;
  }

  .gm-dd-item {
    padding: 14px 24px !important;
    min-height: 56px !important;
  }

  /* ── Meeting panel: bottom sheet ── */
  #gm-modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  #gm-meeting-panel {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 8px 16px calc(24px + env(safe-area-inset-bottom)) !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
    animation: gm-sheet-in .22s cubic-bezier(.2,.8,.4,1) !important;
  }

  #gm-meeting-panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #dadce0;
    border-radius: 2px;
    margin: 0 auto 16px;
  }

  #gm-meeting-panel .gm-mp-footer {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
  }

  #gm-meeting-panel .gm-mp-invite-btn,
  #gm-meeting-panel .gm-mp-join-btn {
    justify-content: center !important;
    width: 100% !important;
  }

  #gm-meeting-panel .gm-mp-email-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #gm-meeting-panel .gm-mp-send-btn {
    width: 100% !important;
  }
}

/* ─── ≤ 390 px  (small phones: SE, 12 mini, Galaxy A-series) ─── */
@media (max-width: 390px) {
  .welcome .header-container {
    padding: 24px 14px 20px !important;
  }
  .welcome .header-text-title {
    font-size: 1.75rem !important;
  }
  .welcome .header-text-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 20px !important;
  }
  .gm-history-btn,
  .gm-signout-btn {
    font-size: 0.75rem !important;
    padding: 0 10px !important;
  }
}

/* ── Insecure room / character warning ── */
.welcome .insecure-room-name-warning,
.welcome .not-allow-title-character-div {
  font-family: var(--gm-font) !important;
  border-radius: 8px !important;
}

/* ============================================================
   PREMEETING / PREJOIN SCREEN
   ============================================================ */

.premeeting-screen {
  background: var(--gm-bg) !important;
  font-family: var(--gm-font) !important;
}

/* Camera preview */
#preview {
  background: var(--gm-surface) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

/* Join button */
.premeeting-screen .action-btn.primary {
  background: var(--gm-primary) !important;
  border-color: var(--gm-primary) !important;
  border-radius: var(--gm-radius-pill) !important;
  font-family: var(--gm-font) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  padding: 10px 24px !important;
}

.premeeting-screen .action-btn.primary:hover {
  background: var(--gm-primary-hover) !important;
  border-color: var(--gm-primary-hover) !important;
}

.premeeting-screen .action-btn.secondary {
  background: var(--gm-surface) !important;
  border-radius: var(--gm-radius-pill) !important;
  border-color: transparent !important;
}

.premeeting-screen .action-btn.secondary:hover {
  background: #4a4e52 !important;
}

/* ============================================================
   VIDEO CONFERENCE PAGE
   ============================================================ */

#videoconference_page {
  background-color: var(--gm-bg) !important;
}

#videospace {
  background-color: var(--gm-bg) !important;
}

/* Main large video */
#largeVideoContainer {
  background: var(--gm-bg) !important;
}

#largeVideoWrapper {
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

/* Background blur layer */
#largeVideoBackgroundContainer {
  filter: blur(30px) !important;
  opacity: 0.4 !important;
}

/* ============================================================
   VIDEO TILES
   ============================================================ */

/* All video containers */
.videocontainer {
  background-color: var(--gm-surface) !important;
  border-radius: var(--gm-radius) !important;
  overflow: hidden !important;
  border: 2px solid transparent !important;
}

/* Active speaker highlight - Google Meet uses a subtle ring */
.filmstrip__videos .videocontainer.active-speaker {
  border: 2px solid var(--gm-primary) !important;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3) !important;
}

/* Video elements inside containers */
.filmstrip__videos .videocontainer > video {
  border-radius: var(--gm-radius) !important;
}

/* Tile view */
.tile-view .remote-videos > div .videocontainer {
  border-radius: var(--gm-radius) !important;
  margin: 4px !important;
}

/* Local video */
#localVideoWrapper video,
#localVideoWrapper object {
  border-radius: var(--gm-radius) !important;
}

/* Filmstrip thumbnails */
.filmstrip__videos .videocontainer {
  border-radius: var(--gm-radius) !important;
  background: var(--gm-surface) !important;
}

/* ============================================================
   DISPLAY NAMES ON VIDEO TILES
   ============================================================ */

.displayname,
.toolbox-content .displayname,
.tile-view .displayname {
  font-family: var(--gm-font) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  letter-spacing: 0.01em !important;
}

/* ============================================================
   TOOLBAR
   ============================================================ */

/* Toolbar wrapper */
.toolbox-content-wrapper {
  background-color: transparent !important;
  border-radius: var(--gm-radius-pill) !important;
  overflow: visible !important;
}

.toolbox-content-wrapper::after {
  content: none !important;
  display: none !important;
}

/* Toolbar items row */
.toolbox-content-items {
  background: rgba(32, 33, 36, 0.92) !important;
  border-radius: var(--gm-radius-pill) !important;
  padding: 8px 16px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  gap: 4px !important;
  display: flex !important;
  align-items: center !important;
}

/* Individual toolbar buttons */
.toolbox-icon {
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  background-color: var(--gm-surface) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.15s ease !important;
  margin: 0 2px !important;
}

.toolbox-icon:hover {
  background-color: #4a4e52 !important;
}

/* Toggled (muted) state */
.toolbox-icon.toggled {
  background-color: #ffffff !important;
}

.toolbox-icon.toggled svg {
  fill: #202124 !important;
}

/* SVG icons color */
.toolbox-icon svg {
  fill: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
}

/* End call button - Google red */
div.hangup-button {
  background-color: var(--gm-danger) !important;
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
}

div.hangup-button:hover {
  background-color: var(--gm-danger-hover) !important;
}

div.hangup-button svg {
  fill: #ffffff !important;
}

/* Hangup menu button */
div.hangup-menu-button {
  background-color: var(--gm-danger) !important;
  border-radius: 50% !important;
}

div.hangup-menu-button:hover {
  background-color: var(--gm-danger-hover) !important;
}

/* Raise hand - yellow when active */
.raise-hand-button-container .toolbox-icon.toggled {
  background-color: #fbbc04 !important;
}

.raise-hand-button-container .toolbox-icon.toggled svg {
  fill: #202124 !important;
}

/* Badge on toolbar buttons */
.badge-round {
  background-color: var(--gm-primary) !important;
  border-radius: 50% !important;
}

/* Toolbar bottom margin */
.toolbox-content {
  margin-bottom: 20px !important;
}

/* ============================================================
   OVERFLOW MENU (More options popup)
   ============================================================ */

.overflow-menu {
  background-color: var(--gm-surface-3) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  font-family: var(--gm-font) !important;
}

.overflow-menu-item {
  color: var(--gm-text) !important;
  font-family: var(--gm-font) !important;
}

.overflow-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.overflow-menu-hr {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   CHAT PANEL
   ============================================================ */

.chat-container,
#sideToolbarContainer {
  background-color: var(--gm-surface-3) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-family: var(--gm-font) !important;
}

.chat-header {
  background-color: var(--gm-surface-3) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-family: var(--gm-font) !important;
  font-weight: 500 !important;
}

.chat-input-container,
.chatInput {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-radius: var(--gm-radius-pill) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-family: var(--gm-font) !important;
}

.chat-message .messagecontent {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
}

/* ============================================================
   PARTICIPANTS PANE
   ============================================================ */

.participants-pane-body,
.participants-pane-top {
  background-color: var(--gm-surface-3) !important;
  font-family: var(--gm-font) !important;
}

.participants-pane-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ============================================================
   DIALOGS / MODALS
   ============================================================ */

.dialog-container {
  font-family: var(--gm-font) !important;
}

[data-testid="dialog.confirm"] {
  background: var(--gm-surface-3) !important;
  border-radius: 12px !important;
  font-family: var(--gm-font) !important;
}

/* ============================================================
   NOTIFICATIONS / TOASTS
   ============================================================ */

.notif-container {
  font-family: var(--gm-font) !important;
}

/* ============================================================
   SUBJECT / MEETING TITLE
   ============================================================ */

#subject,
.subject-info-container,
.subject {
  font-family: var(--gm-font) !important;
  background: rgba(32, 33, 36, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  border-radius: 8px !important;
}

/* ============================================================
   AUDIO / VIDEO PREVIEW BUTTONS ON PREMEETING
   ============================================================ */

.audio-preview .toolbox-icon,
.video-preview .toolbox-icon {
  background-color: var(--gm-surface) !important;
  border-radius: 50% !important;
}

.audio-preview .toolbox-icon.toggled,
.video-preview .toolbox-icon.toggled {
  background-color: var(--gm-danger) !important;
}

.audio-preview .toolbox-icon.toggled svg,
.video-preview .toolbox-icon.toggled svg {
  fill: #ffffff !important;
}

/* ============================================================
   SETTINGS DIALOG
   ============================================================ */

.settings-dialog {
  font-family: var(--gm-font) !important;
}

/* ============================================================
   SCROLLBARS
   ============================================================ */

::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 3px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

/* ============================================================
   MOBILE / SMALL SCREEN ADJUSTMENTS
   ============================================================ */

@media (max-width: 500px) {
  .toolbox-content-items {
    border-radius: 0 !important;
    padding: 8px 4px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  .toolbox-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  div.hangup-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }
}

/* ============================================================
   LOBBY SCREEN
   ============================================================ */

.lobby-screen {
  background: var(--gm-bg) !important;
  font-family: var(--gm-font) !important;
}

/* ============================================================
   REACTIONS MENU
   ============================================================ */

.reactions-menu {
  background: var(--gm-surface-3) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================
   POPOVER
   ============================================================ */

.popover {
  background: var(--gm-surface-3) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  font-family: var(--gm-font) !important;
  color: var(--gm-text) !important;
}

/* ============================================================
   RECORDING INDICATOR
   ============================================================ */

.recording-label {
  background: rgba(32, 33, 36, 0.9) !important;
  border-radius: 6px !important;
  font-family: var(--gm-font) !important;
}

/* ============================================================
   DOMINANT SPEAKER INDICATOR
   ============================================================ */

.dynamic-shadow {
  box-shadow: 0 0 0 4px var(--gm-primary), 0 0 20px rgba(26, 115, 232, 0.4) !important;
}

/* ============================================================
   DROPDOWN — PASSWORD TOGGLE + ERROR
   ============================================================ */


/* ── Toast notification (errors / info) ── */
#gm-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--gm-font);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  animation: gm-dd-in .2s ease;
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  white-space: normal;
  text-align: center;
}
.gm-toast--error { background: #d93025; color: #fff; }
.gm-toast--info  { background: #cd766a; color: #fff; }

/* ============================================================
   MEETING "FOR LATER" MODAL
   All rules scoped under #gm-meeting-panel + !important to
   override Jitsi's all.css global resets.
   ============================================================ */

@keyframes gm-modal-in {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}
@keyframes gm-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Backdrop ── */
#gm-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99998 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  animation: gm-backdrop-in .18s ease !important;
}

/* ── Card ── */
#gm-meeting-panel {
  font-family: 'Google Sans', Roboto, Arial, sans-serif !important;
  background: #fff !important;
  border-radius: 28px !important;
  box-shadow: 0 6px 28px rgba(0,0,0,.2), 0 1px 6px rgba(0,0,0,.08) !important;
  width: 100% !important;
  max-width: 480px !important;
  padding: 28px 28px 24px !important;
  box-sizing: border-box !important;
  position: relative !important;
  animation: gm-modal-in .2s cubic-bezier(.2,.8,.4,1) !important;
  margin: 0 !important;
}

/* ── Close button (top-right corner) ── */
#gm-meeting-panel .gm-mp-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  color: #5f6368 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: background .15s !important;
  outline: none !important;
  flex-shrink: 0 !important;
}
#gm-meeting-panel .gm-mp-close:hover {
  background: #f1f3f4 !important;
  color: #202124 !important;
}

/* ── Heading (icon + title) ── */
#gm-meeting-panel .gm-mp-heading {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 48px 20px 0 !important; /* right margin leaves room for close btn */
  padding: 0 !important;
}

#gm-meeting-panel .gm-mp-heading-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #f5deda !important;
  color: #cd766a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

#gm-meeting-panel .gm-mp-title {
  font-size: 1.125rem !important;
  font-weight: 500 !important;
  color: #202124 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  font-family: inherit !important;
}

/* ── Link chip ── */
#gm-meeting-panel .gm-mp-link-chip {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #f1f3f4 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  border: 1.5px solid transparent !important;
  transition: border-color .15s !important;
}
#gm-meeting-panel .gm-mp-link-chip:focus-within {
  border-color: #cd766a !important;
}

#gm-meeting-panel .gm-mp-link-text {
  flex: 1 !important;
  font-size: 0.9375rem !important;
  color: #cd766a !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

#gm-meeting-panel .gm-mp-link-copy {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #fff !important;
  border: 1.5px solid #dadce0 !important;
  border-radius: 24px !important;
  color: #cd766a !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 6px 14px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: background .15s, border-color .15s !important;
  outline: none !important;
  line-height: 1.3 !important;
}
#gm-meeting-panel .gm-mp-link-copy:hover {
  background: #f5deda !important;
  border-color: #cd766a !important;
}

/* ── Description text ── */
#gm-meeting-panel .gm-mp-desc {
  font-size: 0.875rem !important;
  color: #5f6368 !important;
  line-height: 1.6 !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  font-family: inherit !important;
  display: block !important;
}

/* ── Footer ── */
#gm-meeting-panel .gm-mp-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding-top: 16px !important;
  border-top: 1px solid #e8eaed !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#gm-meeting-panel .gm-mp-invite-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 24px !important;
  color: #cd766a !important;
  font-family: inherit !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  padding: 10px 18px !important;
  cursor: pointer !important;
  transition: background .15s !important;
  white-space: nowrap !important;
  outline: none !important;
  line-height: 1.2 !important;
}
#gm-meeting-panel .gm-mp-invite-btn:hover {
  background: #f5deda !important;
}

#gm-meeting-panel .gm-mp-join-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #cd766a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 24px !important;
  padding: 10px 24px !important;
  font-family: inherit !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background .2s, box-shadow .2s !important;
  outline: none !important;
  line-height: 1.2 !important;
  box-shadow: 0 1px 4px rgba(26,115,232,.4) !important;
}
#gm-meeting-panel .gm-mp-join-btn:hover {
  background: #1558b0 !important;
  box-shadow: 0 3px 10px rgba(26,115,232,.45) !important;
}

/* ── Email invite section ── */
#gm-meeting-panel .gm-mp-email-section {
  margin: 0 0 20px !important;
  padding: 0 !important;
}

#gm-meeting-panel .gm-mp-email-label {
  display: block !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #3c4043 !important;
  margin-bottom: 8px !important;
  font-family: inherit !important;
}

#gm-meeting-panel .gm-mp-email-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

#gm-meeting-panel .gm-mp-email-input {
  flex: 1 !important;
  border: 1px solid #dadce0 !important;
  border-radius: 8px !important;
  padding: 9px 14px !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  color: #202124 !important;
  background: #fff !important;
  outline: none !important;
  transition: border-color .15s, box-shadow .15s !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
#gm-meeting-panel .gm-mp-email-input:focus {
  border-color: #cd766a !important;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15) !important;
}
#gm-meeting-panel .gm-mp-email-input::placeholder {
  color: #9aa0a6 !important;
}

#gm-meeting-panel .gm-mp-send-btn {
  flex-shrink: 0 !important;
  background: #cd766a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 18px !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background .15s !important;
  outline: none !important;
  line-height: 1.4 !important;
}
#gm-meeting-panel .gm-mp-send-btn:hover {
  background: #1558b0 !important;
}
#gm-meeting-panel .gm-mp-send-btn:disabled {
  background: #a8c7fa !important;
  cursor: default !important;
}

#gm-meeting-panel .gm-mp-email-hint {
  font-size: 0.8125rem !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  min-height: 18px !important;
  color: #5f6368 !important;
  font-family: inherit !important;
}
#gm-meeting-panel .gm-mp-email-hint--ok {
  color: #137333 !important;
}
#gm-meeting-panel .gm-mp-email-hint--error {
  color: #c5221f !important;
}

/* Meeting panel mobile styles now handled in the mobile section above */

/* ── Logo sizing for mobile deep-linking & prejoin ── */
.deep-linking-mobile .header .logo,
.deep-linking-mobile .header .logo img {
  max-width: 80px !important;
  max-height: 80px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
}

.deep-linking-desktop .header .logo,
.deep-linking-desktop .header .logo img {
  max-width: 120px !important;
  max-height: 60px !important;
  height: auto !important;
  object-fit: contain !important;
}

.deep-linking-mobile__body .image,
.deep-linking-mobile__body .image img {
  max-width: 120px !important;
  max-height: 120px !important;
  object-fit: contain !important;
}

/* Constrain any logo/watermark image on all screens */
img[src*="watermark"],
img[src*="jitsilogo"],
img[src*="logo-deep-linking"] {
  max-width: 120px !important;
  max-height: 120px !important;
  object-fit: contain !important;
}
