@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Color Variables */
:root {
  --zoom-blue: #0B5CFF;
  --zoom-blue-hover: #004CE5;
  --bg-white: #ffffff;
  --bg-dark: #23273A; /* live dark blue-gray footer */
  --bg-dark-select: #2c3149;
  --text-dark: #1A1A24;
  --text-gray: #6E768A;
  --text-light: #ffffff; /* live links are white */
  --border-light: #e2e4eb;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Reset and Core Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Almaden Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #f4f5f8;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: var(--text-dark);
}

/* Constrain view to mobile width, centered on larger displays */
.mobile-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-white);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Header Styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background-color: var(--bg-white);
  z-index: 2100;
}

.header-left {
  display: flex;
  align-items: center;
}

.zoom-logo-link svg {
  height: 25px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-gray);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--zoom-blue);
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 32px;
  width: 32px;
}

.hamburger-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--zoom-blue);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Main Content Area */
.content {
  padding: 24px 20px;
  flex-grow: 1;
}

.instruction-block {
  margin-bottom: 32px;
}

.instruction-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 16px;
  font-weight: 400;
}

/* Buttons styling */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  background-color: var(--zoom-blue);
  color: var(--bg-white);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(14, 113, 235, 0.2);
}

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

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #f4f5f8;
  color: #9b9fa9;
  border: 1px solid var(--border-light);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.down-error-message {
  margin-top: 14px;
  color: #222;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
}

.down-error-message svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer Styles */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 24px 48px 24px;
}

.footer-section {
  margin-bottom: 32px;
}

.footer-title {
  color: var(--bg-white);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

/* Footer Link Columns (2-column layout on mobile) */
.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.footer-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: color 0.2s;
  display: block;
}

.footer-link:hover {
  color: var(--bg-white);
  text-decoration: underline;
}

/* Language and Currency dropdown custom styling */
.dropdown-group {
  margin-bottom: 24px;
}

.dropdown-label {
  color: var(--bg-white);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.custom-select {
  width: 100%;
  background-color: var(--bg-dark-select);
  border: 1px solid #4a516d;
  color: var(--bg-white);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

.custom-select-wrapper::after {
  content: "▼";
  font-size: 10px;
  color: var(--text-light);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Social Media Icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-dark-select);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.social-circle:hover {
  background-color: var(--zoom-blue);
  transform: translateY(-2px);
}

.social-circle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Legal Footer Area */
.legal-footer {
  border-top: 1px solid #383e54;
  padding-top: 24px;
  text-align: left;
}

.copyright-text {
  font-size: 13px;
  color: #a4a9be;
  margin-bottom: 12px;
  line-height: 1.5;
}

.legal-links {
  font-size: 13px;
  color: #a4a9be;
  line-height: 1.8;
}

.legal-links a {
  color: #a4a9be;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
  white-space: nowrap;
}

.legal-links a:hover {
  color: var(--bg-white);
}

.legal-divider {
  margin: 0 4px;
  color: #5c627a;
  display: inline-block;
}

/* Privacy Choices Checkmark Logo */
.privacy-choices-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
}

.privacy-choices-icon svg {
  height: 12px;
  width: auto;
}

/* Drawer Menu (Overlay) Styles */
.drawer-menu {
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  height: calc(100vh - 64px);
  background-color: var(--bg-white);
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.drawer-menu.open {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.drawer-header .nav-link {
  color: #5c6479;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.drawer-header .nav-link:hover {
  color: var(--zoom-blue);
}

.close-btn-container {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.close-btn-container svg {
  width: 20px;
  height: 20px;
  stroke: var(--zoom-blue);
}

.drawer-scroll-content {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 100px;
}

/* Search Box styling in Drawer */
.search-box-wrapper {
  padding: 16px 20px;
}

.search-box-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: var(--text-gray);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  background-color: #ffffff;
  border: 1px solid #dcdfe9;
  border-radius: 4px;
  padding-left: 40px;
  padding-right: 16px;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
}

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

/* Accordion Menu */
.accordion-list {
  display: flex;
  flex-direction: column;
}

.accordion-item {
  border-bottom: 1px solid #e2e4eb;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #3c4558;
  cursor: pointer;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: #f9fafb;
}

.accordion-chevron {
  width: 12px;
  height: 12px;
  fill: var(--zoom-blue);
  transition: transform 0.2s;
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  background-color: #f9fafb;
  transition: max-height 0.25s ease-out;
}

.accordion-panel-content {
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-link {
  text-decoration: none;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
}

.panel-link:hover {
  color: var(--zoom-blue);
}

.static-item-link {
  display: block;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #3c4558;
  text-decoration: none;
  border-bottom: 1px solid #e2e4eb;
  transition: background-color 0.2s;
}

.static-item-link:hover {
  background-color: #f9fafb;
}

/* Secondary Drawer Menu Links */
.drawer-secondary-links {
  margin-top: 24px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.secondary-link {
  display: block;
  padding: 0;
  color: #5c6479;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
}

.secondary-link:hover {
  color: var(--zoom-blue);
}

/* Sticky Bottom Drawer buttons */
.drawer-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px 24px 20px;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.drawer-btn {
  flex: 1;
  height: 46px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.drawer-btn-secondary {
  background-color: var(--bg-white);
  border: 1.5px solid var(--zoom-blue);
  color: var(--zoom-blue);
}

.drawer-btn-secondary:hover {
  background-color: rgba(11, 92, 255, 0.04);
}

.drawer-btn-primary {
  background-color: var(--zoom-blue);
  border: none;
  color: var(--bg-white);
}

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

/* Floating Chat Badge */
.chat-badge {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--zoom-blue);
  box-shadow: 0 4px 16px rgba(14, 113, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1500;
  transition: transform 0.2s, background-color 0.2s;
}

/* Scale the badge position slightly if the container is centered on desktop */
@media (min-width: 481px) {
  .chat-badge {
    left: calc(50% + 150px); /* 50% + 240px - 56px - 20px + styling offsets */
    right: auto;
  }
}

.chat-badge:hover {
  background-color: var(--zoom-blue-hover);
  transform: scale(1.05);
}

.chat-badge svg {
  width: 24px;
  height: 24px;
  fill: var(--bg-white);
}

/* Custom Alert / Toast for User-Agent display or Join meeting room name input */
.join-prompt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 3000;
}

.join-prompt-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-white);
  width: 90%;
  max-width: 380px;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: modalSlide 0.25s ease-out;
}

@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.modal-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
}

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

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.modal-btn-cancel {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-gray);
}

.modal-btn-confirm {
  background-color: var(--zoom-blue);
  border: none;
  color: var(--bg-white);
}

/* User Agent Info Box for demonstration/later use UI */
.ua-info-box {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background-color: #f5f6f9;
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-family: monospace;
  color: var(--text-gray);
  word-break: break-all;
}

/* Desktop / Tablet Responsiveness styles */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .mobile-container {
    max-width: 100%;
    box-shadow: none;
  }

  .header {
    height: 72px; /* Slightly taller for desktop professionalism */
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: 40px;
    margin-right: auto;
  }

  .desktop-nav-link {
    text-decoration: none;
    color: #5c6479;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s;
  }

  .desktop-nav-link:hover {
    color: var(--zoom-blue);
  }

  .hamburger-btn,
  .close-btn-container,
  .drawer-menu {
    display: none !important;
  }

  /* Content area styling */
  .content {
    background-color: #f7f9fc;
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 60px 40px;
  }

  .instruction-block {
    flex: 1 1 380px;
    max-width: 480px;
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
  }

  .instruction-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
  }

  /* Footer styling */
  .footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 40px 40px;
    max-width: 100%;
    background-color: var(--bg-dark);
  }

  .footer-section {
    margin-bottom: 0;
  }

  .footer-links-grid {
    display: block; /* stack link columns inside each grid section on desktop */
  }

  .footer-link {
    margin-bottom: 10px;
  }

  .dropdown-group {
    grid-column: span 1;
    margin-top: 20px;
    margin-bottom: 0;
  }

  .social-icons {
    grid-column: span 2;
    margin-top: 32px;
    margin-bottom: 0;
    display: flex;
    justify-content: flex-end;
  }

  .legal-footer {
    grid-column: span 4;
    border-top: 1px solid #383e54;
    padding-top: 24px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .copyright-text {
    margin-bottom: 0;
  }

  .chat-badge {
    left: auto !important;
    right: 40px !important;
    bottom: 40px !important;
  }
}

@media (min-width: 1200px) {
  .header {
    padding: 0 calc((100% - 1200px) / 2 + 24px);
  }

  .content {
    padding: 60px calc((100% - 1200px) / 2 + 24px);
  }

  .footer {
    padding: 60px calc((100% - 1200px) / 2 + 24px) 40px;
  }
}
