/* panel.css - Unified Panel & Toolbar Styles */

/* Overlay Panel Base Styles */
.panel {
  position: fixed;
  top: 0;
  height: 100vh;
  /* Inherit Apple-like background, border-radius, shadow, font, color from main.css */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right 0.3s ease, left 0.3s ease, transform 0.3s ease;
}

.settings-panel-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--background-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

/* Card Styles (for panel content) */
.card {
  background: var(--card-background);
  box-shadow: var(--card-shadow);
  border: none;
  border-radius: 8px;
}

.card:hover {
  box-shadow: var(--card-hover-shadow);
}

.list-group-item.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* Shared style */
.toolbar-container {
  position: fixed;
  display: flex;
  gap: 10px;
  z-index: 1001;
}

#toolbar-top-left {
  top: 16px;
  left: 16px;
  flex-direction: row;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#toolbar-top-left.panel-open {
  transform: translateX(var(--panel-width));
}

.toolbar-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#toolbar-top-right {
  top: 16px;
  right: 16px;
  flex-direction: row-reverse;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#toolbar-bottom-left {
  bottom: 50px;
  left: 25px;
  flex-direction: row;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#toolbar-bottom-left.panel-open {
  transform: translateX(var(--panel-width));
}

#toolbar-bottom-right {
  bottom: 50px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Search Container Responsive Styles */
.search-container {
  width: 320px;
  max-width: 90vw;
}

@media (max-width: 768px) {
  .search-container {
    width: min(260px, 70vw);
  }

  .search-input {
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  #toolbar-top-left,
  #toolbar-top-right,
  #toolbar-bottom-left,
  #toolbar-bottom-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }

  #toolbar-top-left {
    top: 12px;
    left: 12px;
    align-items: flex-start;
  }

  /* Optional: Set ordering so buttons come first, search second on mobile */
  .panel-toggle-btn {
    order: 1;
  }

  .search-container {
    order: 2;
  }

  #toolbar-top-right {
    top: 12px;
    right: 12px;
    align-items: flex-end;
  }

  #toolbar-bottom-left {
    bottom: 12px;
    left: 12px;
    align-items: flex-start;
  }

  #toolbar-bottom-right {
    bottom: 40px;
    right: 12px;
    align-items: flex-end;
  }
}

.panel-toggle-btn {
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #222;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s, background 0.2s, transform 0.15s;
  outline: none;
}

.panel-toggle-btn:hover,
.panel-toggle-btn:focus {
  background: #f7f7f7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: scale(1.08);
}

.panel-toggle-btn.active {
  background: #f0f0f0;
  color: #1976d2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.map-nav-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 48px;
  height: 48px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #444;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
  outline: none;
}

.map-nav-btn:hover {
  background-color: #f5f5f5;
}

.map-nav-btn:active {
  transform: scale(0.95);
}

/* Modern Language Selector Styles */
.language-selector-section {
  margin-top: 1rem;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.info-text {
  padding-top: 25px;
}

.language-selector-container {
  min-height: 120px;
  position: relative;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.loading-spinner .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--card-background);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.language-option:hover {
  background: var(--hover-background);
  border-color: var(--accent-color-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-option.selected {
  background: var(--accent-color-light);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.language-option.locked {
  background: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.7;
}

.language-option.locked:hover {
  transform: none;
  box-shadow: none;
  background: #f8f9fa;
  border-color: transparent;
}

.language-option.loading {
  pointer-events: none;
  opacity: 0.6;
}

.language-option.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-option.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

.language-flag {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  min-width: 2rem;
  text-align: center;
}

.language-info {
  flex: 1;
  min-width: 0;
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.2;
}

.language-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.125rem;
}

.language-lock {
  color: var(--warning-color, #ff9800);
  font-size: 1rem;
  margin-left: 0.5rem;
  opacity: 0.7;
}

.language-check {
  color: var(--success-color, #4caf50);
  font-size: 1rem;
  margin-left: 0.5rem;
  animation: checkScale 0.3s ease;
}

@keyframes checkScale {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.upgrade-notice {
  margin-top: 1.5rem;
}

.upgrade-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  text-align: left;
}

.upgrade-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  opacity: 0.8;
}

.upgrade-content h5 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.upgrade-content p {
  margin: 0 0 0.75rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.upgrade-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--color-premium);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.upgrade-btn:hover {
  background: var(--color-premium-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  color: white;
  text-decoration: none;
}

.error-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.error-message h5 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.error-message p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .language-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
  }
  
  .upgrade-card {
    padding: 1.5rem;
  }
}

/* Legal Links Section Styling */
.legal-links-section {
  margin-top: 0.5rem;
}

.legal-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.legal-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  background: linear-gradient(90deg, #f4f7fa 0%, #e8eef4 100%);
  border: 1.5px solid #dde6ef;
  color: #222;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--panel-font);
  box-shadow: 0 1px 2px 0 rgba(200, 200, 200, 0.05);
  transition: background 0.2s, border 0.2s, box-shadow 0.2s, color 0.2s;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.legal-link:hover {
  background: #e8eef4;
  border-color: #b6c6da;
  color: #222;
  text-decoration: none;
}

.legal-link:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Mobile responsive adjustments for legal links */
@media (max-width: 768px) {
  .legal-links-grid {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .legal-link {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Welcome Modal Styles */
.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-modal-overlay.show {
  opacity: 1;
}

.welcome-modal-content {
  background: var(--card-background);
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(30px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.welcome-modal-overlay.show .welcome-modal-content {
  transform: translateY(0);
}

.welcome-modal-header {
  padding: 1.25rem 2rem 0.75rem 2rem;
  text-align: center;
  border-bottom: none;
}

.welcome-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.welcome-subtext-chips {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: 0;
}

.welcome-subtext-chips .chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--accent-color-light, #e3f2fd) 0%, #f0f7ff 100%);
  color: var(--accent-color, #1976d2);
  border-radius: 16px;
  font-size: 0.6875rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.12);
  transition: all 0.2s ease;
}

.welcome-subtext-chips .chip:hover {
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
  transform: translateY(-1px);
}

.welcome-modal-body {
  padding: 0.5rem 2rem 1rem 2rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* Custom scrollbar styling for webkit browsers */
.welcome-modal-body::-webkit-scrollbar {
  width: 8px;
}

.welcome-modal-body::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.welcome-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.welcome-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
  background-clip: content-box;
}

.welcome-section {
  margin-bottom: 1rem;
}

.welcome-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.welcome-features-list {
  list-style: none;
  padding: 1rem;
  margin: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.welcome-features-list li {
  display: flex;
  align-items: flex-start;
  padding: 0.5rem 0;
  line-height: 1.5;
}

.welcome-features-list li:first-child {
  padding-top: 0;
}

.welcome-features-list li:last-child {
  padding-bottom: 0;
}

.welcome-features-list i {
  margin-right: 0.75rem;
  margin-top: 0.15rem;
  font-size: 1rem;
  color: var(--color-success, #10b981);
  min-width: 18px;
}

.welcome-features-list span {
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Info Banner Styles */
.info-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  margin-top: 0.75rem;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.info-banner i {
  color: #d97706;
  font-size: 1rem;
  flex-shrink: 0;
}

.info-banner-content {
  flex: 1;
}

.info-banner-content span {
  color: #92400e;
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Upgrade Teaser Section */
.upgrade-teaser {
  background: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.upgrade-header {
  margin-bottom: 0.625rem;
}

.upgrade-teaser h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.upgrade-features-horizontal {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.upgrade-feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.upgrade-cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.upgrade-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--color-primary, #2563eb) 0%, var(--color-primary-dark, #1d4ed8) 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  white-space: nowrap;
}

.upgrade-cta-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-dark, #1d4ed8) 0%, #1e40af 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.upgrade-price-hint {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}

.welcome-modal-footer {
  padding: 1rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.01) 100%);
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 0.75rem;
}

.welcome-actions-footer {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.welcome-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.welcome-btn.primary-large {
  background: linear-gradient(135deg, var(--color-success, #10b981) 0%, var(--color-success-dark, #059669) 100%);
  color: white;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  letter-spacing: -0.01em;
}

.welcome-btn.primary-large:hover {
  background: linear-gradient(135deg, var(--color-success-dark, #059669) 0%, #047857 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.welcome-btn.secondary-outline {
  background: white;
  color: var(--text-color);
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  border: 2px solid var(--border-color, #e5e7eb);
  font-weight: 500;
}

.welcome-btn.secondary-outline:hover {
  background: var(--bg-hover, #f9fafb);
  border-color: var(--border-hover, #d1d5db);
  transform: translateY(-1px);
}

.welcome-btn.tertiary-link {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  font-weight: 500;
  font-size: 0.8125rem;
  text-align: center;
  border-radius: 0;
}

.welcome-btn.tertiary-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
  background: transparent;
}

.welcome-btn.secondary-link {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  font-weight: 500;
  font-size: 0.8125rem;
  text-align: center;
  border-radius: 0;
}

.welcome-btn.secondary-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
  background: transparent;
}


.welcome-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 0;
  flex-wrap: wrap;
}

.welcome-footer-links .footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
  font-weight: 500;
}

.welcome-footer-links .footer-link:hover {
  color: var(--accent-color);
}

/* Parcel Disclaimer */
.parcel-disclaimer {
  margin-top: 0.25rem;
  padding-top: 0.375rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.parcel-disclaimer p {
  font-size: 0.625rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  opacity: 0.75;
}

.welcome-footer-language {
  display: flex;
  align-items: center;
}

.welcome-language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-language-selector .language-label {
  font-size: 1rem;
  margin: 0;
}

.welcome-language-selector .language-select {
  padding: 0.375rem 0.625rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--background-color);
  color: var(--text-color);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.welcome-language-selector .language-select:hover {
  border-color: var(--accent-color);
  background: var(--accent-color-light, #e3f2fd);
}

.welcome-language-selector .language-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Button text responsive display */
.btn-text-desktop {
  display: inline;
}

.btn-text-mobile {
  display: none;
}

/* Document content area styles */
.document-content {
  padding: 1rem 2rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* Custom scrollbar styling for document content */
.document-content::-webkit-scrollbar {
  width: 8px;
}

.document-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.document-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.document-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
  background-clip: content-box;
}

.document-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light, #e0e0e0);
}

.document-back-btn {
  background: var(--background-color);
  border: 1px solid var(--color-border-light, #e0e0e0);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-back-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.document-body {
  line-height: 1.6;
  color: var(--text-primary);
}

.document-body h1,
.document-body h2,
.document-body h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.document-body h1 {
  font-size: 1.5rem;
}

.document-body h2 {
  font-size: 1.3rem;
}

.document-body h3 {
  font-size: 1.1rem;
}

.document-body p {
  margin-bottom: 1rem;
}

.document-body ul,
.document-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.document-body li {
  margin-bottom: 0.5rem;
}

/* Mobile responsive adjustments for welcome modal */
@media (max-width: 768px) {
  .welcome-modal-overlay {
    padding: 0.75rem;
    align-items: center;
    justify-content: center;
  }

  .welcome-modal-content {
    margin: 0;
    max-height: calc(100vh - 1.5rem);
    width: calc(100% - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    border-radius: 20px;
  }

  .welcome-modal-header {
    padding: 1.25rem 1.5rem 0.625rem 1.5rem;
  }

  .welcome-modal-header h2 {
    font-size: 1.125rem;
  }

  .welcome-modal-body {
    padding: 0.375rem 1.5rem 1rem 1.5rem;
  }

  .welcome-modal-footer {
    padding: 0.875rem 1.5rem;
  }

  .welcome-actions {
    gap: 0.625rem;
    margin-bottom: 1rem;
  }

  .welcome-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .welcome-btn.primary-large {
    padding: 0.9375rem 1.75rem;
    font-size: 0.9375rem;
  }

  .btn-text-desktop {
    display: none;
  }

  .btn-text-mobile {
    display: inline;
  }

  .welcome-footer-links {
    gap: 1rem;
    padding: 0.625rem 0;
  }

  .upgrade-teaser {
    padding: 0.75rem 0.875rem;
  }

  .upgrade-teaser h3 {
    font-size: 0.75rem;
  }

  .upgrade-features-horizontal {
    gap: 0.375rem;
  }

  .upgrade-feature-pill {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.625rem;
  }

  .upgrade-cta-section {
    align-items: center;
    gap: 0.25rem;
  }

  .upgrade-cta-btn {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }

  .upgrade-price-hint {
    font-size: 0.625rem;
  }

  .parcel-disclaimer p {
    font-size: 0.625rem;
  }

  .document-content {
    padding: 1rem 1.5rem;
  }

  .document-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .welcome-subtext-chips .chip {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.75rem;
  }

  .welcome-features-list {
    padding: 0.875rem;
  }

  .info-banner {
    padding: 0.625rem 0.875rem;
  }
}
