/* Mirrors `main_hub.html` card grid inside the chat column (embedded). */
.chat-startup-hub {
  width: 100%;
  max-width: 100%;
  font-family: "Nunito", Inter, "Segoe UI", system-ui, sans-serif;
}

.chat-startup-hub .forest-page--embedded {
  min-height: calc(100vh - 56px);
  width: 100%;
  background: linear-gradient(160deg, #c8e6c9 0%, #a5d6a7 20%, #81c784 40%, #b2dfdb 70%, #e0f2f1 100%);
  padding: 0 0 64px 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  transition: box-shadow 0.25s ease;
}

.chat-startup-hub .forest-page--embedded::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(27, 94, 32, 0.13));
  pointer-events: none;
}

.chat-startup-hub .trees-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

.chat-startup-hub .hero-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  position: relative;
  z-index: 2;
}

.chat-startup-hub .headline-area {
  text-align: center;
  padding-top: 0;
  width: 100%;
}

.chat-startup-hub .startup-hub-instruction {
  font-size: 18px;
  color: #33691e;
  font-weight: 600;
  line-height: 1.35;
  max-width: 36ch;
  margin: 0 auto;
  padding: 0 12px;
}

.chat-startup-hub .cards-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 28px 12px 8px;
  flex-wrap: wrap;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.chat-startup-hub button.card {
  background: #fff;
  border-radius: 24px;
  padding: 0;
  width: 280px;
  flex: 0 1 280px;
  box-shadow: 0 10px 30px rgba(27, 94, 32, 0.12);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  font: inherit;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  margin: 0;
}

.chat-startup-hub button.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(27, 94, 32, 0.18);
}

.chat-startup-hub button.card:focus-visible {
  outline: 2px solid #2e7d32;
  outline-offset: 3px;
}

.chat-startup-hub .card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.chat-startup-hub .card-body {
  padding: 20px 20px 20px 20px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.chat-startup-hub .card-title {
  font-size: 20px;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: 8px;
}

.chat-startup-hub .card-desc {
  font-size: 14.5px;
  color: #558b2f;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 8px;
}

.chat-startup-hub .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  align-self: flex-start;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chat-startup-hub .badge-recommend {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
}

.chat-startup-hub .badge-new {
  background: #f1f8e9;
  color: #558b2f;
  border: 1.5px solid #c5e1a5;
}

.chat-startup-hub .badge-spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Full-width row in messages column */
.msg-row-startup-hub {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
}

.msg-row-startup-hub .chat-startup-hub {
  width: 100%;
}

@media (max-width: 768px) {
  .chat-startup-hub .forest-page--embedded {
    min-height: auto;
    padding-bottom: 40px;
  }

  .chat-startup-hub .hero-area {
    margin-top: 20px;
  }

  .chat-startup-hub .startup-hub-instruction {
    font-size: 22px;
    max-width: 28ch;
  }

  .chat-startup-hub .cards-row {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px 14px 8px;
  }

  .chat-startup-hub button.card {
    width: min(100%, 440px);
    flex: 0 1 100%;
    border-radius: 22px;
  }

  .chat-startup-hub .card-img {
    height: 184px;
    border-radius: 22px 22px 0 0;
  }

  .chat-startup-hub .card-body {
    padding: 22px 20px 0;
  }

  .chat-startup-hub .card-title {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .chat-startup-hub .card-desc {
    font-size: 17px;
    line-height: 1.65;
  }

  .chat-startup-hub .badge {
    margin-top: 12px;
    padding: 5px 13px;
    font-size: 12px;
  }
}

/* ── Auto Mode toggle (chat-startup-hub embedded version) ── */
.chat-startup-hub .auto-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(46, 125, 50, 0.25);
  border-radius: 999px;
  padding: 6px 16px 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #558b2f;
  margin-bottom: 14px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
}
.chat-startup-hub .auto-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(46, 125, 50, 0.45);
}
.chat-startup-hub .auto-mode-toggle[aria-pressed="true"] {
  background: rgba(25, 118, 210, 0.12);
  border-color: #1976d2;
  color: #1565c0;
}
.chat-startup-hub .toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: #b0bec5;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.chat-startup-hub .auto-mode-toggle[aria-pressed="true"] .toggle-track {
  background: #1976d2;
}
.chat-startup-hub .toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.chat-startup-hub .auto-mode-toggle[aria-pressed="true"] .toggle-thumb {
  transform: translateX(16px);
}

.chat-startup-hub .auto-mode-custom-hint {
  margin: -2px auto 12px;
  max-width: 42ch;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(46, 125, 50, 0.76);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.chat-startup-hub .auto-mode-custom-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Auto Mode overlay / dialog (used in chatbot_ui.html) ── */
.auto-mode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}
.auto-mode-dialog {
  background: #fff;
  border-radius: 20px;
  padding: 28px 28px 24px;
  max-width: 400px;
  width: calc(100% - 32px);
  font-family: "Nunito", Inter, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: autoModeDialogIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes autoModeDialogIn {
  from { opacity: 0; transform: scale(0.88) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.auto-mode-dialog-icon {
  font-size: 32px;
  text-align: center;
}
.auto-mode-dialog-title {
  font-size: 18px;
  font-weight: 800;
  color: #1b5e20;
  text-align: center;
  margin: 0;
}
.auto-mode-dialog-desc {
  font-size: 14px;
  color: #558b2f;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}
.auto-mode-never-ask {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #558b2f;
}
.auto-mode-never-ask input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #1976d2;
  flex-shrink: 0;
}
.auto-mode-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.auto-mode-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: "Nunito", Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.12s;
}
.auto-mode-btn:active { transform: scale(0.97); }
.auto-mode-btn-custom {
  background: #f1f8e9;
  color: #33691e;
  border: 1.5px solid #c5e1a5;
}
.auto-mode-btn-custom:hover { background: #e8f5e9; }
.auto-mode-btn-auto {
  background: #1976d2;
  color: #fff;
}
.auto-mode-btn-auto:hover { background: #1565c0; }
.auto-mode-btn-auto:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Count selector specific */
.auto-mode-dialog--count {
  max-width: 440px;
}
.count-selector-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0;
}
.count-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.count-row-label {
  font-size: 14px;
  font-weight: 700;
  color: #2e7d32;
  min-width: 80px;
  flex-shrink: 0;
}
.count-segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.count-step-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #c5e1a5;
  background: #f1f8e9;
  color: #33691e;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.count-step-btn:hover { background: #e8f5e9; }
.count-step-btn.active {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.count-total-badge {
  font-size: 13px;
  font-weight: 700;
  color: #1b5e20;
  background: #e8f5e9;
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
}
.count-selector-warn {
  font-size: 13px;
  color: #c62828;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

@media (max-width: 520px) {
  .chat-startup-hub .auto-mode-custom-hint {
    font-size: 12px;
    max-width: 30ch;
  }

  .chat-startup-hub .startup-hub-instruction {
    font-size: 20px;
  }

  .chat-startup-hub .cards-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-startup-hub button.card {
    width: 100%;
    min-width: 0;
    flex: none;
    border-radius: 18px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  .chat-startup-hub .card-img {
    height: 116px;
    border-radius: 18px 18px 0 0;
  }

  .chat-startup-hub .card-body {
    padding: 16px 14px 10px;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }

  .chat-startup-hub .card-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .chat-startup-hub .card-desc {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
  }

  .chat-startup-hub .badge {
    margin-top: auto;
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }
}
