/* 📁 static/css/tyt.css */

/* =========================
   Navbar Sticky Header
   ========================= */
nav.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  /* Ensure navbar stays above other content */
  background-color: #ffffff;
  /* White background when scrolling */
}

.navbar-tinted {
  background-color: #f5fff5 !important;
  /* Light green background for the navbar */
}

/* =========================
   Footer Styling
   ========================= */

.footer {
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem;
  color: #555;
  margin-top: auto;
}

.footer label {
  font-weight: 700;
  margin-bottom: .8rem;
}

.footer ul {
  padding-left: 0;
  list-style: none;
}

.footer li {
  font-size: .9rem;
  margin-bottom: .5rem;
}

.footer a:hover {
  text-decoration: underline;
}

.footer i {
  font-size: .8rem;
}

/* =========================
   Base Background & Typography
   ========================= */
/* Force full white background and set base font for public-facing pages */
body {
  background-color: #fff;
  color: #333;
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
}

/* =========================
   Hero Section Styling
   ========================= */
.hero-section {
  padding-top: 1rem;
  padding-bottom: 20px;
  /* Added bottom padding */
  background-color: #ffffff;
}

.hero-section .headline {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-align: center;
}

/* Logo next to headline */
.logo-img {
  height: 48px;
  width: auto;
}

.hero-section .subheadline {
  font-size: 1.1rem;
  color: #555;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* =========================
   Card Styling
   ========================= */
.card {
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  /* Light gray border */
  border-radius: .5rem !important;
  /* Rounded corners */
  transition: transform 0.2s ease-in-out, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  object-fit: cover;
}

.card-title {
  font-weight: 600;
  font-size: 1.2rem;
}

.card-footer {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.text-muted {
  font-size: 0.95rem;
}

/* =========================
   Dashboard Card Styling
   ========================= */
.dashboard-card {
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  /* Light gray border */
  border-radius: 0.5rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.dashboard-card .card-footer .btn {
  font-weight: 600;
}

.dashboard-card .text-muted {
  font-size: 0.95rem;
}

/* =========================
   Buttons
   ========================= */
.btn-primary {
  background-color: #248742;
  border-color: #248742;
}

.btn-primary:hover {
  background-color: #1c6b36;
  border-color: #1c6b36;
}

.city-btn {
  width: 350px;
  text-align: center;
}

/* =========================
   Table Sticky Header
   ========================= */
thead.sticky-header th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* =========================
   Modal Styling
   ========================= */
.modal-dialog iframe {
  width: 100%;
  height: 75vh;
  border: none;
}

.modal-header {
  padding-left: 30px !important;
  background-color: #dedede !important;
}

.modal-title {
  font-weight: 700 !important;
}

/* But override for delete modals only */
#confirmDeleteModal .delete-modal-header {
  background-color: var(--bs-danger) !important;
  color: white !important;
}

#confirmDeleteModal .delete-modal-header .btn-close {
  filter: invert(1); /* makes close button white */
}

/* =========================
   Tables
   ========================= */
.table-fixed-layout {
  table-layout: fixed;
}

/* =========================
   Input Fields
   ========================= */
input.form-control::placeholder {
  color: #c0c0c0;
  font-style: italic;
  font-size: 0.9em;
}

/* =========================
   Quiz Question Transitions
   ========================= */
.fade-in {
  animation: fadeIn 0.3s ease-in-out both;
}

.fade-out {
  animation: fadeOut 0.2s ease-in-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* =========================
   Quiz Page Styles
   ========================= */
/* Apply flex layout to body on quiz (and other public-homepage) pages,
   ensuring footer (if any) sticks to bottom */
body.public-homepage {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fff;
  /* Override if needed */
  color: #222;
  /* Matches quiz’s dark text */
}

/* Center the quiz container and constrain its width */
#quiz-container {
  max-width: 480px;
  margin: 0 auto 1rem;
  padding: 0 1rem;
  text-align: center;
  flex-grow: 1;
}

/* Quiz page title styling (uses Bebas Neue font) */
#quiz-page-title {
  font-family: 'Bebas Neue', sans-serif;
  color: #1a3c40;
  font-weight: 600;
}

/* Adjust quiz page title size on larger screens */
@media (min-width: 320px) {
  #quiz-page-title {
    font-size: 2.5rem;
    line-height: 2.6rem;
    margin-bottom: 1.25rem;
  }
}

@media (min-width: 420px) {
  #quiz-page-title {
    font-size: 3rem !important;
    line-height: 3.1rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Quiz question text styling */
.quiz-question-text {
  font-size: 1.1rem !important;
  color: #1a3c40 !important;
}

/* Question card wrapper */
.question-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(26, 60, 64, 0.1);
  padding: 1.25rem 1rem 2rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

/* Individual question text inside the card */
.question-text {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: #222;
}

/* Grid layout for answer buttons */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .answers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Style each answer button */
.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #1a3c40;
  border-radius: 12px;
  background-color: #ffffff;
  padding-top: 10px;
  padding-bottom: 10px;
  color: #1a3c40;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.option-btn:hover,
.option-btn:focus {
  background-color: #1a3c40;
  color: #ffffff;
  outline: none;
}

/* If an option is selected (active), override border and background */
.option-btn.active {
  background-color: #159613 !important;
  color: #ffffff !important;
  border-color: #159613 !important;
}

/* Answer option images inside buttons */
.option-btn img {
  width: 60px;
  height: 60px;
  margin-right: 1rem;
  margin-bottom: 0;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(26, 60, 64, 0.1);
}

/* Back button under each question card */
.back-btn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto 1.5rem;
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  color: #1a3c40;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.back-btn:hover,
.back-btn:focus {
  color: #144338;
  outline: none;
}

/* Dim back button when disabled */
.back-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Optional: style arrow inside a button (if you choose an icon approach) */
.back-arrow {
  font-size: 1.5rem;
  line-height: 1;
  color: #3d75ae;
  /* Normal state */
  transition: opacity 0.2s ease;
}

#back-btn:disabled .back-arrow {
  opacity: 0.3;
  cursor: default;
}

/* Bottom progress bar container */
.progress-bar-container {
  width: 100%;
  max-width: 480px;
  height: 10px;
  background-color: #e6f1ef;
  border-radius: 8px;
  margin: 0 auto 2rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Fill inside the progress bar */
.progress-bar-fill {
  height: 100%;
  background-color: #1a3c40;
  border-radius: 8px;
  width: 0%;
  transition: width 0.3s ease;
}

/* =========================
   Limit Quiz UI Width on Wider Screens
   ========================= */
@media (min-width: 576px) {

  /* Ensure quiz container does not exceed 525px */
  #quiz-ui {
    max-width: 525px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Make option buttons full-width on larger screens */
  .option-btn {
    width: 100%;
  }
}

/* =========================
   Results Forecast & Badges
   ========================= */
.recommended-box {
  border: 1px solid var(--bs-primary);
  background-color: rgba(14, 107, 13, 0.1);
  padding: 5px 15px 5px 10px;
  /* top right bottom left */
  margin-bottom: 10px;
  gap: 0.5rem;
  white-space: nowrap;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 300;
  display: inline-flex;
  /* Ensure flex layout for gap */
  align-items: center;
  /* Vertically center icon and text */
}

.forecast-wrapper {
  max-width: 100%;
}

@media (min-width: 576px) {
  .forecast-wrapper {
    max-width: 75%;
  }
}

@media (min-width: 768px) {
  .forecast-wrapper {
    max-width: 50%;
  }
}

@media (min-width: 992px) {
  .forecast-wrapper {
    max-width: 33%;
  }
}

/* =========================
   Admin Badge Variants
   ========================= */

/* Tag color badges */
.badge-tag {
  padding: 0.35em 0.6em;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
}

.badge-relaxer {
  background-color: #74bfa1;
}

/* Darker than #F0FAF3 */
.badge-foodie {
  background-color: #f38b66;
}

/* Darker than #FFF5F0 */
.badge-social {
  background-color: #5d8ee4;
}

/* Darker than #F0F6FF */
.badge-explorer {
  background-color: #91aa73;
}

/* Darker than #F3F8F0 */
.badge-culture {
  background-color: #a27dd8;
}

/* Darker than #F8F0FF */
.badge-planner {
  background-color: #4fa5d5;
}

/* Darker than #DBF0FF */

/* =========================
   Home Page Styles (Root)
   ========================= */
.navbar-brand {
  text-decoration: none !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  margin-right: 16px !important;
  font-size: 19px !important;
  letter-spacing: -1px !important;
}

header img.logo {
  height: 48px;
  margin-bottom: 1.5rem;
  max-width: 100%;
  height: auto;
}

h1 {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 3.2rem !important;
  text-align: center !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  margin-bottom: 1rem !important;
  color: #1a3c40 !important;
}

p.subheadline {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #555;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.lead {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
}

/* Container for city carousel on landing page */
.cities-container {
  max-width: 600px;
  /* Matches headline max-width */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Responsive tweaks for small screens */
@media (min-width: 320px) {
  h1 {
    font-size: 2.5rem !important;
    margin-bottom: 2rem !important;
  }

  p.subheadline {
    font-size: 0.9rem !important;
    max-width: 85% !important;
  }

  .navbar-brand {
    font-size: 16px !important;
  }

  .lead {
    font-size: 1.3rem;
    margin-left: 10%;
    margin-right: 10%;
  }

  button.start-quiz {
    background-color: #1a3c40 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.8rem 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    width: 240px !important;
    transition: background-color 0.3s ease !important;
    margin-bottom: 2rem !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 420px) {
  h1 {
    font-size: 2.7rem !important;
  }

  p.subheadline {
    font-size: 0.9rem !important;
    margin-left: 12%;
    margin-right: 12%;
  }

  .navbar-brand {
    font-size: 18px !important;
  }

  .lead {
    font-size: 1.4rem;
  }
}

@media (min-width: 576px) {
  p.subheadline {
    font-size: 1.1rem !important;
  }

  button.start-quiz {
    padding: 1rem 0 !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    width: 300px !important;
    margin-bottom: 3rem !important;
  }

  .lead {
    font-size: 1.3rem;
  }
}

@media (min-width: 768px) {
  h1 {
    font-size: 3.4rem !important;
  }

  .navbar-brand {
    font-size: 21px !important;
  }
}

/* Change start-quiz button on hover/focus */
button.start-quiz:hover,
button.start-quiz:focus {
  background-color: #144338;
  outline: none;
}

/* =========================
   City Landing Page Styles
   ========================= */
.city-landing-container {
  max-width: 480px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
  background-color: #fff;
  /* Optional: white background */
}

.city-landing-container header img.logo {
  height: 48px;
  margin-bottom: 1rem;
}

.city-landing-container h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.75rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: #1a3c40;
}

.city-landing-container button.start-quiz {
  background-color: #1a3c40 !important;
  color: #ffffff;
  border: none;
  padding: 1.15rem 0 !important;
  font-size: 1.25rem !important;
  font-weight: 600;
  width: 40% !important;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 1.5rem !important;
}

.city-landing-container button.start-quiz:hover,
.city-landing-container button.start-quiz:focus {
  background-color: #144338;
  outline: none;
}

.city-landing-container .hero-image {
  margin: 2rem 0 1.5rem;
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(26, 60, 64, 0.2);
  object-fit: cover;
  height: 240px;
}

.city-landing-container p.subheadline {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #4a4a4a;
  max-width: 425px;
  margin-left: auto;
  margin-right: auto;
}

.city-landing-container .highlights {
  font-size: 1rem !important;
  color: #555555;
  margin-bottom: 1.5rem !important;
}

.city-landing-container .social-proof {
  font-size: 1rem;
  color: #888888;
  margin-top: 3rem;
  font-style: italic;
}

.city-landing-container footer {
  margin-top: 4rem;
  font-size: 0.85rem;
  color: #aaa;
}

.city-landing-container footer a {
  color: #1a3c40;
  text-decoration: none;
  margin: 0 0.5rem;
}

.city-landing-container footer a:hover {
  text-decoration: underline;
}

/* Responsive tweaks for city landing */
@media (min-width: 320px) {
  .city-landing-container button.start-quiz {
    padding: 1.15rem 0 !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    width: 90% !important;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 1.5rem !important;
  }

  .city-landing-container .highlights {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    margin-left: 10%;
    margin-right: 10%;
  }
}

@media (min-width: 420px) {
  .city-landing-container button.start-quiz {
    padding: 1.15rem 0 !important;
    font-size: 1.1rem !important;
    width: 80% !important;
  }
}

@media (min-width: 768px) {
  .city-landing-container {
    max-width: 600px;
  }

  .city-landing-container h1 {
    font-size: 3.5rem;
  }

  .city-landing-container button.start-quiz {
    padding: 1.15rem 0 !important;
    font-size: 1.1rem !important;
    width: 70% !important;
  }
}

/* =========================
   Dashboard Styles
   ========================= */
.city-bg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--city-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  /* Adjust opacity as needed */
  z-index: 0;
  border-radius: inherit;
  /* If your card has rounded corners */
}

.city-bg-card>* {
  position: relative;
  z-index: 1;
}