/* Hide upload view before first paint when loading a run directly */
html.preload-analysis #uploadView {
  display: none;
}

/* Reset and global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  /* Remove tap highlight on mobile */
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  font-weight: 400;
  background-color: #f5f5f5;
  color: #333333;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Improve font rendering on mobile */
}

html {
  direction: ltr !important;
}

h1,
h2,
tr,
td,
body,
button {
  font-family: 'Funnel Display', sans-serif;
}

.no-break {
  white-space: nowrap;
}

/* Fixed blurred background - only shown during analysis */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: none;
  will-change: opacity;
  /* Optimize for mobile performance */
}

.background-overlay.active {
  opacity: 1;
  display: block;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.app-header.visible {
  display: flex !important;
  flex-direction: row;
}

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

.logo {
  height: 28px;
}

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

.header-right,
a {
  text-decoration: none;
}

.header-h3 {
  font-weight: 600;
  font-size: 14px;
  color: #004b35;
  font-family: 'Funnel Display', sans-serif;
}

.map-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.map-loader.hidden {
  display: none;
}

.map-loader--status {
  padding: 24px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #027753;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loadingStatusText {
  color: #027753;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}

.loadingStatusText span,
.map-status-message span {
  display: block;
  white-space: nowrap;
}

.map-status-card {
  align-items: center;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  min-width: min(420px, 100%);
  max-width: 100%;
  padding: 28px 24px 24px;
  overflow: hidden;
}

.map-status-message {
  color: #333333;
  font-size: clamp(1rem, 4.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 20px;
  text-align: center;
  max-width: 100%;
}

.explore-error-logo {
  height: 22px;
  margin-top: 18px;
  object-fit: contain;
}

.map-status-ok {
  flex: 0 0 auto !important;
  min-height: 44px;
  min-width: 120px;
  padding: 10px 28px;
  width: auto;
}

.map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin-top: 40px;
}

/* Pins are drawn by the map itself now (a symbol layer, so place labels can sit
   on top of them), not as DOM markers, so there is no .custom-marker to style.
   Sizing lives in the layer's icon-size in js/explore-locations.js. */

.map-modal {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  display: none;
  background: rgba(0, 0, 0, 0.2);
  justify-content: center !important;
  align-items: flex-end !important;
  z-index: 9999;
  top: 0;
}

.map-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 10px;
  padding: 20px;
  max-width: 400px;
  margin: auto;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-content img {
  width: 50%;
  border-radius: 10px;
  margin-bottom: 12px;
  object-fit: cover;
  max-height: 120px;
}

.modal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 12px;
}

.modal-content button {
  width: 100%;
  background-color: #027753;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-weight: 500;
  cursor: pointer;
}

.close-modal {
  font-size: 28px;
  float: right;
  cursor: pointer;
  color: #027753;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 50px);
  width: 100vw;
  position: relative;
  background: #eaf8f4;
  padding-top: 50px;
  direction: ltr;
}

.container.analysis-mode {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  background: transparent;
  width: 100vw;
  height: calc(100vh - 102px);
  direction: ltr;
  overflow: hidden;
  padding: 10px;
  padding-top: 62px !important; /* .analysis-top-bar height (52px) + 10px spacing */
  gap: 10px;
  top: 50px;
}

.main-content {
  position: relative;
  flex: 1 1 60%;
  max-width: 60%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* Upload view specific styles */
.upload-view .main-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  background: #eaf8f4;
  justify-content: center;
}

/* Analysis state adjustments */
.container.analysis-mode .main-content {
  background: transparent !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  order: 2 !important;
}

.sidebar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  flex: 1 1 40%;
  max-width: 40%;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: static;
  transform: none;
  transition: none;
  position: sticky;
  top: 50px;
  order: 1 !important;
  margin: 0 !important;
  flex-shrink: 0;
}

#sidebarContent {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insightsContainer-style {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar.visible {
  transform: none;
}

/* Ensure Dig Deeper mode fills the sidebar height */
.sidebar.dig-deeper-mode {
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 20px !important;
  margin: 0 !important;
  gap: 16px !important;
  display: flex;
  flex-direction: column;
}

/* Adjust the detailed insight card in Dig Deeper mode */
.detailed-insight-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  padding: 52px 20px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
  overflow-y: scroll;
  height: auto;
  max-height: 100%;
  position: relative;
}

.card-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #016143;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-close-btn:hover {
  background: #e8e8e8;
}
.detailed-insight-card .dig-deeper-footer {
  margin-top: 26px;
  color: #666666;
  font-size: 12px;
  line-height: 18px;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Image container for overlaying emojis */
.image-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* Emoji overlay styles */
.icon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Emoji styles with tooltip */
.emoji {
  position: absolute;
  font-size: 24px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
  pointer-events: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Animate the settle pass's exact correction; % left/top computed values
     don't change while the box resizes, so live tracking stays instant. */
  transition:
    left 0.12s ease-out,
    top 0.12s ease-out;
}

.emoji svg,
.emoji img {
  width: 100%;
  height: 100%;
  display: block;
}

.emoji.highlighted {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)) drop-shadow(4px 6px 8px rgba(0, 0, 0, 0.3));
  transform: translate(-50%, -50%) scale(1.3);
}

/* Tooltip on emoji hover */
.emoji:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #333333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Connecting lines from fanned-out emojis back to anchor */
.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.connection-line {
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 4, 4;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.connection-line.visible {
  opacity: 1;
}

/* Analysis questions */
.survey-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
  z-index: 1000;
}

/* Background map layer */
.map-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ddd;
  /* fallback */
  background-size: cover;
  background-position: center;
  filter: grayscale(40%) brightness(0.8);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.map-background.active {
  opacity: 1;
}

/* Preview section styles */
.preview-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.street-photo {
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  display: block !important;
  margin: auto;
  will-change: opacity;
  /* Optimize for mobile performance */
}

.street-photo.visible {
  opacity: 1;
}

.analysis-view {
  display: none;
  width: 100%;
  min-height: 100%;
}

.analysis-view.active {
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

.analysis-view.revealed {
  visibility: visible;
}

.analysis-top-bar {
  display: flex;
  position: fixed;
  top: 55px;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1001;
  pointer-events: none;
  height: 52px;
}

.analysis-top-bar.hidden {
  display: none;
}

.analysis-top-bar.modal-suppressed {
  display: none;
}

.analysis-share-btn {
  pointer-events: all;
  background: #fff;
  color: #006143;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: 'Funnel Display', sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.analysis-share-btn:hover {
  background: #e8e8e8;
}

.overview-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

.location-block {
  margin-bottom: 14px;
}

.location-line {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: #333333;
}

.street-description {
  font-weight: 400;
  color: #666666;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.insight-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.insight-card[data-valence='happy'] {
  --sc: #4bde80;
}
.insight-card[data-valence='medium'] {
  --sc: #f9c248;
}
.insight-card[data-valence='neutral'] {
  --sc: #f9c248;
}
.insight-card[data-valence='sad'] {
  --sc: #f97171;
}
.insight-card[data-valence='danger'] {
  --sc: #f97171;
}
.insight-card[data-valence='mythbuster'] {
  --sc: #4187ff;
}

.header-text {
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 500;
}

.mythbuster-header-text {
  color: #4187ff;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.insight-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.insight-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tooltip on insight-icon hover */
.insight-icon:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #333333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.insight-title {
  font-weight: 700;
  font-size: 22px;
  color: #333333;
  overflow-wrap: break-word;
}

.insight-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  display: none;
}

.tag {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag.positive,
.modal-tag.positive {
  color: #059669;
  border-color: #d1fae5;
  background-color: #d1fae5;
}

.tag.negative,
.modal-tag.negative {
  color: #dc2626;
  border-color: #fee2e2;
  background-color: #fee2e2;
}

.tag.neutral,
.modal-tag.neutral {
  color: #f59e0b;
  border-color: #fef3c7;
  background-color: #fef3c7;
}

/* Style the tag symbols (arrows) */
.tag-symbol.positive {
  color: #059669;
}

.tag-symbol.negative {
  color: #dc2626;
}

.tag-symbol.neutral {
  color: #f59e0b;
}

.insight-description {
  font-weight: 400;
  color: #666666;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.modal-insight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-insight-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-insight-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-insight-title {
  font-weight: 600;
  font-size: 24px;
  color: #333333;
  overflow-wrap: break-word;
  margin-bottom: 12px;
}

.modal-insight-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  display: none;
}

.modal-tag {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
}

.detailed-description {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Custom bullets for detailed description */
.detailed-description li {
  padding-left: 20px;
  list-style-type: none;
}

.detailed-description li::before {
  content: '• ';
  color: #666666;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 120px;
  touch-action: manipulation;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary:disabled {
  background-color: #99cebc;
  color: #ffffff;
}

/* Filled mint green — primary action (Dig Deeper, Submit, Share) */
.btn-primary {
  background-color: #d0ede4;
  color: #065f46;
  transition: background-color 0.2s ease;
}

.btn-primary:not(:disabled):hover,
.btn-primary:not(:disabled):active {
  background-color: #a7f3d0;
}

.btn-primary:focus {
  outline: 2px solid #a7f3d0;
  outline-offset: 2px;
}

/* Ghost green — secondary action (Give Input, Skip, Go Back) */
.btn-secondary {
  background-color: transparent;
  color: #006143;
}

.btn-secondary:hover,
.btn-secondary:active {
  background-color: #e5e7eb;
}

/* White + border — tertiary action (Give Feedback, Cancel in modals) */
.btn-outline {
  background-color: #fff;
  color: #006143;
  border: 1px solid #d5d7da;
}

.btn-outline:hover,
.btn-outline:active {
  background-color: #f5f5f5;
}

/* Text-only dismiss — cancel in modals */
.btn-cancel {
  background: transparent;
  color: #006143;
  border: none;
}

.btn-cancel:hover {
  color: #006143;
}

.feedback-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.feedback-input-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.feedback-privacy-note {
  font-size: 12px;
  color: #666666;
  margin: 0;
}

.textarea-wrapper {
  position: relative;
}

.feedback-textarea {
  width: 100%;
  height: 68px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  color: #333333;
  font-family: inherit;
  resize: vertical;
}

.feedback-textarea.voice-memo-textarea {
  padding-bottom: 110px;
}

.feedback-textarea::placeholder {
  color: #666666;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #9ca3af;
}

.mic-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #c8e6e0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.mic-btn:hover {
  background-color: #a8d5cc;
}

.recording-indicator {
  color: #c00;
  font-size: 14px;
  font-weight: 500;
}

.voice-stop-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8eaed;
  border: none;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.voice-stop-btn:hover {
  background-color: #d1d5db;
}

.delete-memo-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #fee2e2;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #dc2626;
  font-weight: 600;
  transition: background-color 0.2s;
}

.delete-memo-btn:hover {
  background-color: #fecaca;
}

.feedback-action-row {
  flex-direction: row-reverse;
}

.final-card .action-buttons {
  flex-direction: column;
}

.final-card .btn {
  width: 100%;
  margin-bottom: 10px;
}

.insight-subtitle {
  margin-top: 13px;
  margin-bottom: 13px;
}

.btn-danger {
  background: transparent;
  border: none;
  color: #006143;
}

.btn-danger:hover {
  background: transparent;
  color: #dc2626;
}

#deleteConfirmModal .modal-subtitle {
  margin: 20px 0 28px;
  line-height: 1.6;
}

#deleteConfirmModal .btn-outline {
  border: none;
}

.btn-delete {
  background-color: #fee2e2;
  color: #dc2626;
}

.btn-delete:hover {
  background-color: #fca5a5;
}

/* Consent checkbox */
.consent-container {
  margin-bottom: 16px;
  text-align: center;
}

.consent-label {
  color: #333333;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}

.consent-label input[type='checkbox'] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #027753;
  cursor: pointer;
}

.consent-label a {
  color: #027753;
  text-decoration: underline;
}

.consent-label a:hover {
  color: #015a3f;
}

.btn-upload-photo.disabled {
  background-color: #99cebc;
  color: #ffffff;
  cursor: not-allowed;
}

/* Upload styles */
.upload-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eaf8f4;
  border: none;
  border-radius: 0;
  max-width: none;
  text-align: center;
  box-shadow: none;
  min-height: 100vh;
  width: 100%;
}

.upload-view.hidden {
  display: none;
}

.photo-upload-area,
.photo-error-area {
  text-align: center;
  padding: 60px 40px;
  background: #ffffff;
  /* border: 2px dashed #d1d5db; */
  border-radius: 12px;
  width: 500px;
  max-width: 100%;
  margin-bottom: 24px;
}

.camera-icon,
.error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #666666;
}

.upload-title,
.error-title {
  font-weight: 500;
  font-size: 20px;
  color: #333333;
  margin-bottom: 8px;
}

.upload-subtitle,
.error-subtitle {
  font-weight: 400;
  color: #333333;
  font-size: 18px;
  margin-bottom: 24px;
  line-height: 1.5;
  text-align: center;
}

.subtitle-info {
  font-size: 16px;
}

.subtitle-info a {
  display: inline-block;
  color: #059669;
  text-decoration: none;
  text-align: center;
}

.subtitle-info a::before {
  display: block;
  content: attr(title);
  font-weight: bold;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.subtitle-info a:hover {
  font-weight: bold;
}

.home-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.upload {
  background: #d0ede4;
  border-radius: 12px;
}

.explore {
  background: #ffffff;
  border: 1px solid #d5d7da;
  border-radius: 12px;
}

.btn-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  min-height: 44px;
  background: #00482e;
}

.btn-explore {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  min-height: 44px;
  background: #ffffff;
}

.btn-upload-photo {
  background-color: #00482e;
  color: #ffffff;
}

.btn-upload-photo:not(.disabled):hover,
.btn-upload-photo:not(.disabled):active {
  background-color: #00482e;
}

.image-preview {
  margin: 20px 0;
  text-align: center;
}

.image-preview:has(img) {
  margin: 20px auto 0;
  width: 100%;
  max-width: 400px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-upload-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: #065f46;
  font-size: 14px;
}

.photo-upload-loader.hidden {
  display: none;
}

.photo-upload-loader p {
  margin: 0;
}

.photo-upload-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #e5e7eb;
  border-top-color: #059669;
  border-radius: 50%;
  animation: loading-spinner-rotate 1s linear infinite;
}

.image-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-continue {
  width: 100%;
  max-width: 500px;
  padding: 12px;
  background-color: #a7f3d0;
  color: #065f46;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-continue:hover,
.btn-continue:active {
  background-color: #86efac;
}

.btn-continue:disabled {
  background-color: #99cebc;
  cursor: not-allowed;
  color: #ffffff;
  display: none;
}

/* Feedback Modal */
.modal {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 480px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  /* Prevent double-tap zoom on mobile */
}

.modal-close:active {
  transform: scale(0.95);
  /* Visual feedback on tap */
}

.modal-title {
  font-weight: 600;
  font-size: 20px;
  color: #333333;
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-weight: 400;
  color: #666666;
  text-align: center;
  margin-bottom: 14px;
  font-size: 16px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.star {
  font-size: 32px;
  color: #e5e7eb;
  cursor: pointer;
  transition: color 0.2s;
  touch-action: manipulation;
}

.star:hover,
.star.active {
  color: #fbbf24;
}

.star:active {
  transform: scale(0.95);
}

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

/* Photo Source Modal */
.photo-source-modal {
  text-align: center;
  padding: 32px 24px 24px;
}

.photo-source-options {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

.photo-source-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  transition: all 0.2s;
  touch-action: manipulation;
  min-height: 120px;
}

.photo-source-btn:hover,
.photo-source-btn:active {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

.photo-source-btn svg {
  color: #666666;
  transition: color 0.2s;
}

.photo-source-btn:hover svg,
.photo-source-btn:active svg {
  color: #059669;
}

.photo-source-modal .btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: #006143;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.photo-source-modal .btn-cancel:hover,
.photo-source-modal .btn-cancel:active {
  color: #006143;
}

/* App Rating Modal */
.app-rating-modal {
  text-align: center;
}

.app-rating-modal-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.app-rating-modal .modal-subtitle {
  font-size: 15px;
  margin-bottom: 24px;
}

.app-rating-modal .star-rating {
  gap: 12px;
  margin-bottom: 24px;
}

.app-rating-modal .star {
  line-height: 1;
  display: inline-flex;
}

.app-rating-modal .star-svg {
  width: 28px;
  height: 28px;
  display: block;
}

.app-rating-modal .star-path {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill 0.15s;
}

.app-rating-modal .star.active .star-path {
  fill: #1a1a1a;
}

#submitAppRatingBtn {
  display: block;
  width: 100%;
  border-radius: 14px;
  font-size: 17px;
  margin-top: 16px;
  flex: none;
}

#cancelAppRatingBtn {
  display: block;
  width: 100%;
  padding: 14px;
  flex: none;
}

/* Share Input */
#insightFeedbackModal .modal {
  padding: 28px 24px 24px;
}

#insightFeedbackModal h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
  margin-bottom: 20px;
  text-align: left;
}

.insight-feedback-buttons {
  display: flex;
  border: 1.5px solid #d5d7da;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.insight-feedback-btn {
  color: #006143;
  flex: 1;
  padding: 14px 10px;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.insight-feedback-btn.yes {
  border-right: 1.5px solid #d5d7da;
}

.insight-feedback-btn.no {
  border-left: none;
}

.insight-feedback-btn.active {
  background-color: #d1fae5;
}

.insight-feedback-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.share-input-section {
  margin-bottom: 16px;
}

.share-input-section textarea {
  width: 100%;
  height: 100px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 14px;
  resize: none;
  outline: none;
  font-size: 16px;
  color: #333333;
  font-family: 'Funnel Display', sans-serif;
}

.share-input-section textarea::placeholder {
  color: #666666;
}

#insightFeedbackSubmitBtn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 17px;
  flex: none;
}

#cancelInsightFeedback {
  margin-top: 12px;
  width: 100%;
  padding: 8px;
  font-size: 15px;
  flex: none;
}

/* === TOAST === */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #016143;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Funnel Display', sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.toast--error {
  background: #dc2626;
  bottom: 48px;
}

/* Loading Screen Styles */
.loading-screen-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 3000;
}

.loading-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  max-width: 320px;
  width: 88%;
}

.loading-dots {
  display: flex;
  gap: 10px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #059669;
  animation: loading-dot-pulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading-dot-pulse {
  0%,
  60%,
  100% {
    transform: scale(0.55);
    opacity: 0.3;
  }
  30% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes loading-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.processing-image-text {
  font-size: 18px;
  font-weight: 500;
  color: #333333;
  font-family: 'Funnel Display', sans-serif;
  text-align: center;
  min-height: 1.5em;
}

.processing-image-text span {
  animation: loading-msg-appear 0.4s ease both;
}

@keyframes loading-msg-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Media Query for Large Screens (e.g., >1200px) */
@media (min-width: 1201px) {
  .container.analysis-mode {
    padding: 20px;
    gap: 20px;
  }

  .main-content {
    flex: 1 1 65%;
    max-width: 65%;
  }

  .sidebar {
    flex: 1 1 35%;
    max-width: 35%;
    padding: 25px;
  }

  .image-container {
    max-width: 1000px;
  }

  .street-photo {
    max-width: 1000px;
    max-height: 85vh;
  }

  .emoji {
    font-size: 28px;
    width: 36px;
    height: 36px;
  }

  .emoji:hover::after {
    display: block;
    /* Ensure tooltip is visible on hover */
  }

  .detailed-insight-card {
    padding: 24px;
  }

  .modal-insight-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .modal-insight-title {
    font-size: 24px;
    font-weight: 700;
  }

  .modal-insight-tags {
    margin-bottom: 20px;
  }

  .modal-tag {
    padding: 8px 14px;
    font-size: 16px;
  }

  .detailed-description {
    font-size: 16px;
    line-height: 1.7;
  }
}

/* Media Query for Medium Screens (e.g., 769px to 1200px) */
@media (max-width: 1200px) {
  .main-content {
    flex: 1 1 60%;
    max-width: 60%;
  }

  .sidebar {
    flex: 1 1 40%;
    max-width: 40%;
    padding: 15px;
  }

  .image-container {
    max-width: 500px;
  }

  .street-photo {
    max-width: 500px;
    max-height: 75vh;
  }

  .emoji {
    font-size: 22px;
    width: 30px;
    height: 30px;
  }

  .modal-insight-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .modal-tag {
    padding: 6px 12px;
    font-size: 14px;
  }

  .detailed-description {
    font-size: 16px;
    line-height: 1.6;
  }
}

/* Media Query for Small Screens (e.g., 481px to 768px) */
/* this is our mobile view - do the pointer thing to isolate mobile devices. */
@media ((max-width: 768px) and (pointer: coarse)) {
  .container.analysis-mode {
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px;
    padding-top: 62px !important; /* topbar(52px) + 10px */
    padding-bottom: 60px;
    gap: 20px;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
  }

  .main-content {
    flex: 0 0 auto;
    max-width: 100%;
    order: 1 !important;
    /* max-height: 50vh; */
  }

  .sidebar {
    flex: 1;
    max-width: 100%;
    padding: 15px;
    order: 2 !important;
    height: auto;
    overflow-y: visible;
    position: relative;
    background-color: transparent;
    backdrop-filter: blur(0px);
    border-radius: 0px;
    box-shadow: none;
    position: fixed; /* ← pins to bottom of viewport */
    max-width: 100%;
    padding: 15px;
    z-index: 10;

    /* grows upward, overlaps image when tall */
    max-height: 120vh;
    overflow-y: auto;
    top: 112px;
    bottom: 10px;
    width: 95%;
    left: 50%;
    pointer-events: none;
  }

  .sidebar.visible {
    transform: translateX(-50%);
  }

  /* Make sidebar content a horizontal swipeable area */
  #sidebarContent {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    overflow-x: auto;
    gap: 12px;
    padding: 0 10% 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    left: 0;
    pointer-events: auto;
  }

  #sidebarContent::-webkit-scrollbar {
    display: none;
  }

  #sidebarContent.demographic-no-swipe {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    scroll-snap-type: none;
    touch-action: pan-y;
  }

  .insightsContainer-style {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
  }

  .sidebar.dig-deeper-mode #sidebarContent,
  .sidebar.dig-deeper-mode .insightsContainer-style {
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    width: 100%;
  }

  .dem-container {
    max-height: 450px;
    overflow-y: scroll;
  }

  .image-container {
    max-width: 100%;
  }

  .street-photo {
    max-width: 100%;
    max-height: 45vh;
    /* Reduced to fit short screens */
  }

  .icon-overlay {
    z-index: 9;
  }

  .emoji {
    font-size: 20px;
    width: 28px;
    height: 28px;
    touch-action: manipulation;
    z-index: 2;
  }

  .emoji.highlighted,
  .emoji.highlighted:active {
    transform: translate(-50%, -50%) scale(1.3);
  }

  /* Disable emoji tooltips on mobile to avoid hover issues */
  .emoji:hover::after {
    display: none;
  }

  /* Add tap effect for emojis */
  .emoji:active {
    transform: translate(-50%, -50%) scale(0.95);
  }

  .overview-card,
  .insight-card {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    min-width: 0;
    /* Allow shrinking */
    padding: 15px;
    margin-bottom: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
    scroll-snap-align: center;
    /*touch-action: pan-x;*/
    /* Restrict to horizontal touch */
    border: none;
  }

  /* Mobile active card state */
  .insight-card.active {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .insight-tags {
    gap: 4px;
  }

  .insight-title,
  .insight-description {
    overflow-wrap: break-word;
  }

  .btn {
    padding: 8px 12px;
    min-height: 44px;
    /* Ensure accessibility for tap targets */
    min-width: 100px;
  }

  .action-buttons {
    gap: 8px;
    flex-direction: row;
  }

  .detailed-insight-card {
    padding: 15px;
    flex: 0 0 auto;
    max-width: 100%;
    /* Full width in Dig Deeper mode */
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    scroll-snap-align: none;
    bottom: 0;
    position: absolute;
    width: 90%;
    overflow-y: scroll;
  }

  .modal-insight-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .modal-tag {
    padding: 5px 10px;
    font-size: 13px;
  }

  .image-preview:has(img) {
    max-width: 300px;
    height: 220px;
  }

  .image-preview img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
  }
}

/* Disable touch-specific styles on desktop */
@media (min-width: 769px) {
  .overview-card:active,
  .insight-card:active {
    transform: none;
    background-color: white;
  }

  .btn:active {
    transform: none;
  }

  .emoji:active {
    transform: translate(-50%, -50%);
  }

  .modal-close:active,
  .star:active {
    transform: none;
  }

  /* Desktop active card state */
  .insight-card.active {
    box-shadow:
      inset 8px 0 0 0 var(--sc),
      0 2px 12px rgba(0, 0, 0, 0.1);
  }

  /* Hide emoji tooltips when any insight card is active */
  body.has-active-card .emoji:hover::after {
    display: none;
  }
}

/* Ensure smooth scrolling on iOS */
@supports (-webkit-overflow-scrolling: touch) {
  html,
  body {
    /*overscroll-behavior: none;*/
    /* Prevent bounce effect */
  }
}

/* Landing upload page */
.app-header {
  height: 52px;
  padding: 8px 16px;
  background: #ffffff;
  border-bottom: 1px solid #dfdfdf;
  box-shadow: none;
}

.logo {
  width: 89px;
  height: 32px;
  object-fit: contain;
}

.header-h3 {
  color: #016143;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.container:not(.analysis-mode) {
  min-height: 100vh;
  padding-top: 52px;
  background: #eaf8f4;
}

.container:not(.analysis-mode) .main-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 52px);
  align-items: stretch;
}

.upload-view {
  height: calc(100vh - 52px);
  position: relative;
  justify-content: flex-start;
  gap: 26px;
  min-height: calc(100vh - 52px);
  padding: 26px 0 29px;
  background: #eaf8f4;
}

.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(328px, calc(100vw - 48px));
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-align: left;
}

.photo-upload-area .upload-title {
  width: 100%;
  margin: 0;
  color: #016143;
  font-family: 'Funnel Display', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: -0.02em;
}

.photo-upload-area .upload-subtitle {
  width: 100%;
  margin: 0;
  font-family: 'Funnel Display', sans-serif;
  font-size: 16px;
  line-height: 20px;
  text-align: left;
}

.upload-subtitle-emphasis {
  color: #016143;
  font-weight: 700;
}

.upload-subtitle-muted {
  color: #535862;
  font-weight: 400;
}

.landing-hero-frame {
  height: 225px;
  min-height: 150px;
  width: 100%;
  overflow: hidden;
  border: 3px solid #027753;
  border-radius: 16px;
  background: #ffffff;
}

.landing-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-upload-area .image-preview:empty {
  display: none;
  margin: 0;
}

.consent-container {
  width: 280px;
  margin: 0 auto;
  text-align: left;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #535862;
  font-family: 'Funnel Display', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
}

.consent-label input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: #016143;
}

.consent-label a {
  color: #535862;
  text-decoration: underline;
}

.home-buttons {
  width: min(311px, 100%);
  margin: 0;
}

.home-buttons-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.home-buttons.upload,
.home-buttons.explore {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.btn-upload,
.btn-explore {
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  gap: 8px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
  font-family: 'Funnel Display', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.btn-upload img,
.btn-explore img {
  width: 20px;
  height: 20px;
}

.btn-upload-photo,
.btn-upload-photo:not(.disabled):hover,
.btn-upload-photo:not(.disabled):active {
  background: #00482e;
  border: 1px solid #00482e;
  color: #ffffff;
}

.btn-upload-photo.disabled,
.btn-upload-photo.disabled:hover,
.btn-upload-photo.disabled:active,
.btn-upload-photo.disabled:focus {
  background: #99cebc;
  border: 1px solid #99cebc;
  color: #ffffff;
  outline: none;
}

.btn-explore {
  background: #ffffff;
  border: 1px solid #d5d7da;
  color: #414651;
}

.landing-footer {
  width: min(254px, calc(100vw - 48px));
  margin: 0;
  color: #535862;
  font-family: 'Funnel Display', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  text-align: center;
}

.landing-footer a {
  color: inherit;
  text-decoration: underline;
}

/* Media queries for both medium and large screens */
@media (min-width: 769px) {
  .upload-view {
    justify-content: center;
  }

  .photo-upload-area {
    padding: 48px;
    gap: 24px;
    max-height: 100%;
    width: 506px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
      0 20px 24px -4px rgba(10, 13, 18, 0.08),
      0 8px 8px -4px rgba(10, 13, 18, 0.03);
  }

  .landing-hero-frame {
    width: 410px;
  }

  .landing-hero-image {
    object-fit: cover;
  }

  .consent-container {
    width: max-content;
    margin-top: 0;
  }

  .consent-label {
    white-space: nowrap;
  }

  .landing-footer {
    width: auto;
    font-size: 12px;
    line-height: 20px;
  }
}

/* Media query for both medium and large screen size with limited height (for landing upload page)*/
@media (min-width: 769px) and (max-height: 805px) {
  .photo-upload-area {
    padding: 20px 48px;
    gap: 14px; /* reduced gap to fit smaller heights*/
  }

  .landing-hero-frame {
    height: 150px;
  }
}

/* Media query for both medium and large screen size with minimized height (for landing upload page)*/
@media (min-width: 769px) and (max-height: 730px) {
  .upload-view {
    height: auto;
  }

  .photo-upload-area {
    max-height: none;
  }
}

/* Media Queries for small screens (e.g., 481px to 768px) */
@media (max-width: 768px) {
  .container:not(.analysis-mode) {
    align-items: flex-start;
    min-height: auto;
    overflow-y: auto;
  }

  .container:not(.analysis-mode) .main-content {
    min-height: auto;
  }

  .upload-view {
    justify-content: space-between;
    min-height: calc(100dvh - 52px);
    padding: 0px 24px;
  }

  .photo-upload-area {
    gap: 16px;
    height: 100%;
    padding: 13px 0px 10px;
  }

  .consent-container {
    margin-top: 0;
  }
}
