/* ===========================================================
   Body / Hero / Page Wrapper (layout + typography)
   - Hero gradient section
   - Central body wrapper
   - Headline + subtitle
   - Input container shell (layout only)
   =========================================================== */

/* ---------- Hero section ---------- */
.hero {
  /* gradient background kept identical */
  background-image: linear-gradient(to left, rgb(0, 210, 255), rgb(58, 123, 213));
  color: #fff;
  min-height: 100vh;
  padding-block: 64px 24px; /* top/bottom spacing */
}

/* ---------- Central wrapper (matches header wrapper width/padding) ---------- */
#body_wrapper {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
  text-align: center;    /* center hero text */
  margin-top: 100px;     /* compensates for fixed header height */
}

/* ---------- Heading & subtitle (hero text) ---------- */
.hero-title {
  color: #fff;
  font-weight: 800;
  line-height: 1;         /* leading-none */
  margin-bottom: 2rem;    /* mb-8 */
  font-size: 2.25rem;     /* base: text-4xl */
  /* drop-shadow-lg analog */
  filter:
    drop-shadow(0 10px 8px rgba(0,0,0,0.25))
    drop-shadow(0 4px 3px rgba(0,0,0,0.15));
}
@media (min-width: 640px) { /* sm */
  .hero-title {
    font-size: 3rem;      /* sm:text-5xl */
    margin-bottom: 2.5rem;
  }
}
@media (min-width: 768px) { /* md */
  .hero-title { font-size: 3.75rem; } /* md:text-6xl */
}
@media (min-width: 900px) { /* lg */
  .hero-title { font-size: 4.5rem; }  /* lg:text-7xl */
}

.hero-subtitle {
  font-weight: 500;
  font-size: 1.25rem;                   /* text-xl */
  line-height: 1.625;                   /* leading-relaxed */
  color: rgba(255,255,255,0.95);        /* text-white/95 */
  max-width: 56rem;                     /* max-w-4xl */
  margin: 0 auto 2.5rem;                /* mx-auto + mb-10 */
  padding-inline: 1.5rem;               /* px-6 on small screens */
  /* drop-shadow-md analog */
  filter:
    drop-shadow(0 6px 4px rgba(0,0,0,0.2))
    drop-shadow(0 2px 2px rgba(0,0,0,0.15));
}
@media (min-width: 640px) { /* sm */
  .hero-subtitle {
    font-size: 1.5rem;                  /* sm:text-2xl */
    margin-bottom: 3rem;                /* sm:mb-12 */
  }
}
@media (min-width: 768px) { /* md */
  .hero-subtitle { font-size: 1.875rem; } /* md:text-3xl */
}

/* ---------- Small spacing tune-ups ---------- */
@media (max-width: 560px) {
  #body_wrapper { padding-inline: 16px; }
}






/* ===========================================================
   Input Box + Tabs (Manual / Upload)
   (Container, tabs, textarea, upload, small utilities)
   =========================================================== */

#input_box {
  background-color: #fff;
  color: #000;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 12px;
}


#file_upload_icon_big { font-size: 3rem; }

#input_slug { text-align: left; }

.input-title {
  font-size: x-large;
  margin: 6px 0 0 0;
  font-weight: 600;
}
.input-title i {
  font-size: 1.4rem;
  color: var(--primary);
  padding: 5px;
}

.input-instruction {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
  margin-left: 8px;
  color: var(--muted);
}

#user_input {
  width: 100%;
  max-width: 100%;          /* Prevent horizontal overflow */
  min-height: 120px;        /* Default height */
  padding: 0.75rem 1rem;    /* Inner spacing */
  font-size: 1rem;          /* 16px text size */
  line-height: 1.5;         /* Comfortable line spacing */
  font-family: inherit;     /* Use same font as rest of page */
  color: #333;              /* Text color */
  background-color: #fff;   /* Background */
  border: 1px solid #ccc;   /* Light gray border */
  border-radius: 8px;       /* Rounded corners */
  resize: none;             /* Allow vertical resize only */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus state */
#user_input:focus {
  outline: none;
  border-color: #2b63d9; /* Primary color on focus */
  box-shadow: 0 0 0 3px rgba(43, 99, 217, 0.2);
}

#input_entry_counter {
  text-align: left;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
}

#input_entry_counter p {
  padding-top: 8px;
}


/* ----- Tabs (prepared for component split) ----- */

/* Tabs */
.tab-btn {
  background: #fff;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: border 0.1s; /* conservative to avoid visual changes */
}
.tab-btn.active {
  background: #fff;
  color: #000;
  border: 0;
  border-bottom: solid 2px;
  font-weight: 700;
}


/* Tab content visibility */
.tab-content { display: none; margin-top: 1rem; }
.tab-content.active { display: block; }

/* File Upload Area */
.file-upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.file-upload-area:hover {
  border-color: #007bff;
  background: #f1f8ff;
}

.upload-icon {
  display: block;
  margin: 0 auto 1rem;
  color: #6c757d;
}

.file-types {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 1rem 0;
}
.file-types span {
  background: #eee;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
}

.choose-files-btn {
  border: 1px solid #ccc;
  background: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.4s ease;
}
.choose-files-btn:hover { background: var(--primary); color: #fff; }

.max-size {
  margin-top: 0.5rem;
  font-size: 12px;
  color: #666;
}







/* === Stat Boxes Container === */
.stat_container ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* default: 2 columns */
  gap: 1rem;
  padding: 0;
  margin: 20px 0;
}
/* If container > 1100px, use 4 columns */
@media (min-width: 1101px) {
  .stat_container ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Accent Colors (per box) === */
.stat_box:nth-child(1) { background: linear-gradient(135deg,#f5faff,#eef6ff); }
.stat_box:nth-child(2) { background: linear-gradient(135deg,#f5faff,#eef6ff); }
.stat_box:nth-child(3) { background: linear-gradient(135deg,#f5faff,#eef6ff); }
.stat_box:nth-child(4) { background: linear-gradient(135deg,#f5faff,#eef6ff); }
.stat_box:nth-child(5) { background: linear-gradient(135deg,#fff7ed,#fffbeb); }
.stat_box:nth-child(6) { background: linear-gradient(135deg,#fdf4ff,#faf5ff); }
.stat_box:nth-child(7) { background: linear-gradient(135deg,#f4fbf6,#edf9ef); }
.stat_box:nth-child(8) { background: linear-gradient(135deg,#fff4ec,#fff6f0); }

/* === Each Stat Box Card === */
.stat_box {
  background: #f8fbff; /* light gradient look */
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
  min-width: 250px;
  height: 100px;
  text-align: left;
  font-family: 'Inter', sans-serif;  
}
/* === Text Styling === */
.stat_box .stat_value {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  color: #0da2e7;
}
/* Label (top text) */
.stat_label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(83, 99, 151);
}
/* Icon styling */
.stat_box i {
  font-size: 28px;
  color: #3182ed;
  background: rgba(49,130,237,0.1); /* soft blue background circle */
  border-radius: 50%;
  padding: 12px;
  flex-shrink: 0;
}
/* Special Colors for the Demographic Stat Cards */
/* stat card icons */
.stat_box:nth-child(5) i {
  color: #ebb305;
  background-color: #fbf2dd;
}
.stat_box:nth-child(6) i {
  color: #9334e9;
  background-color: #f2e2fe;
}
.stat_box:nth-child(7) i {
  color: #17a34a;
  background-color: #e0f5e5;
}
.stat_box:nth-child(8) i {
  color: #ea580b;
  background-color: #ffe8db;
}
/* stat card values */
.stat_box:nth-child(5) .stat_value {
  color: #ebb305;
}
.stat_box:nth-child(6) .stat_value {
  color: #9334e9;
}
.stat_box:nth-child(7) .stat_value {
  color: #17a34a;
}
.stat_box:nth-child(8) .stat_value {
  color: #ea580b;
}




/* === Charts Container === */

#charts_container {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* default: 2 columns */
  gap: 1rem;
}

/* If container > 900px, use 2 columns */
@media (min-width: 901px) {
  #charts_container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.chart_panel {
  background-color: #fff;
  color: #000;
  height: 350px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}





/* === Map Container === */

#map_container {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* default: 1 columns */
  gap: 1rem;
}

.map_panel {
  background-color: #fff;
  color: #000;
  height: 500px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}



/* === Export Container === */

#export_container {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* default: 1 columns */
  gap: 1rem;
}

.export_panel, .map_panel, .chart_panel {
  background-color: #fff;
  color: #000;
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 24px;
  height: auto;
}

#export_container .export_panel h2 {
  color: #536397;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 300;
}

.export_panel h3 {
  font-size: 1.5rem;

}

.export_slug {
  color: #536397;
  font-size: 0.9rem;
  line-height: 2.25rem;

}


/* === Export Buttons Container ul === */
.export_panel ul {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* default: 1 columns */
  gap: 1rem;
  padding: 0;
  margin: 20px 0;
}
/* If container > 1100px, use 2 columns */
@media (min-width: 640px) {
  .export_panel ul {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* If container > 1100px, use 4 columns */
@media (min-width: 1101px) {
  .export_panel ul {
    grid-template-columns: repeat(4, 1fr);
  }
}


.export_panel ul li {
  background-color: var(--primary);
  border-radius: var(--radius);
  color: #fff;
  padding: 12px;
  transition: scale 0.2s ease;
}

.export_panel ul li:hover {
  scale: 104%;
}

.export_panel ul li i {
  font-size: large;
}

.format_label {
  font-size: 0.65rem;
}




/* Export Button Colors */
.export_panel ul li:nth-child(1) {
  background: linear-gradient(135deg,#10b981,#0d9488);
}
.export_panel ul li:nth-child(2) {
  background: linear-gradient(135deg,#9333ea,#4f46e5);
}
.export_panel ul li:nth-child(3) {
  background: linear-gradient(135deg,#3b82f6,#0891b2);
}
.export_panel ul li:nth-child(4) {
  background: linear-gradient(135deg,#f97316,#dc2626);
}




/* Charts Container Styles */

.chart_panel h3, .map_panel h3 {
  text-align: left;
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 0px;
  margin-bottom: 16px;

}

.chart_panel h3 i, .map_panel h3 i {
  font-size: 1.4rem;
  color: var(--primary);
  padding: 2px;
  display: inline-flex;
  vertical-align: top;
}





/* Map Container Styles */

.map_title_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;

}



@media (max-width: 900px) {
  .map_title_container {
    display: table;
  }
  .map_selector_box {
    margin-top: 1rem;
  }
  
}

.map-instruction {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
  color: var(--muted);
  display: flex;
  margin-bottom: 12px;
}


.map_selector_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;                /* spacing between icon and text */
  white-space: nowrap;
  font-size: 0.75rem;         /* base: ~text-xs */
  font-weight: 500;           /* medium weight */
  line-height: 1.2;
  padding: 0 12px;            /* horizontal padding */
  height: 36px;               /* ~ h-9 */
  border-radius: 6px;         /* rounded-md */
  border: 1px solid #ccc;     /* neutral border */
  background: #fff;           /* background */
  color: #111;                /* text color */
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
}

.map_selector_button:hover {
  background: #f0f4ff;        /* subtle accent on hover */
  color: #000;                /* slightly darker text */
}

.map_selector_button:focus-visible {
  outline: 2px solid #2563eb; /* blue focus ring */
  outline-offset: 2px;
}

.map_selector_button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.map_selector_button i {
  font-size: 1rem;            /* keep icons balanced with text */
  line-height: 1;
  pointer-events: none;       /* don’t trigger clicks */
}

@media (min-width: 640px) {   /* sm: breakpoint */
  .map_selector_button {
    font-size: 0.875rem;      /* sm:text-sm */
  }
  .map_selector_button i {
    font-size: 1.25rem;       /* bump icon size slightly */
  }
}


