/* ========== Base ========== */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

.hero {
  padding: 14px 0 6px;
  border-bottom: 1px solid #e9ecef;
  margin-top: 52px;
}

.hero h3 {
  margin: 0;
  font-weight: 700;
}

.hero p {
  margin: 4px 0 0;
  color: #666;
}

.well {
  background-color: white;
}

/* Make sidebar sticky */
.sidebar-sticky {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}

/* Map height */
#mapPlot {
  height: calc(100vh - 210px) !important;
}

/* ========== Cards ========== */
.faq-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  padding: 14px;
}

.faq-card h4 {
  font-size: 14px;
  margin: 0 0 6px;
  color: #6b7280;
  font-weight: 700;
}

/* Tighten spacing between groups */
.control-group,
.form-group,
.shiny-input-container {
  margin-bottom: 6px !important;
}

/* ========== Top-right subscription button ========== */
.top-right-button {
  position: fixed;
  top: 60px;
  right: 10px;
  z-index: 1000;
  background-color: #ffdd30;
  color: black;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.top-right-button:hover {
  background-color: #e6c82b;
}

/* ========== Date nav buttons under calendar ========== */
.faq-card .date-nav {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.faq-card .date-nav-btn {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  font-size: 11px;
  padding: 4px 10px;
  line-height: 1.2;
  box-shadow: none;
}

.faq-card .date-nav-btn:hover {
  background: #e5e7eb;
}

.faq-card .date-nav-btn:disabled,
.faq-card .date-nav-btn[disabled] {
  background: #f9fafb !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
}

/* ========== Air Quality Model selector (vertical cards) ========== */
.faq-card #model.btn-group-vertical {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
}

.faq-card #model .btn {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  margin: 0 0 8px 0;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  line-height: 1.0;
  background: #ffffff;
  color: #111827;
  white-space: normal;
}

.faq-card #model .btn:last-child {
  margin-bottom: 0;
}

.faq-card #model .btn .model {
  font-weight: 600;
  color: #111827;
}

.faq-card #model .btn .meta {
  color: #6b7280;
  margin-left: 8px;
}

.faq-card #model .btn:hover {
  background: #f8fafc;
}

.faq-card #model .btn.active {
  background: #334155;
  color: #ffffff;
}

.faq-card #model .btn.active .model,
.faq-card #model .btn.active .meta {
  color: #ffffff;
}

/* Hide focus glow for these button groups */
.faq-card #model .btn:focus,
.faq-card #display_var .btn:focus {
  box-shadow: none !important;
}

/* ========== Variable Display segmented buttons ========== */
.faq-card #display_var.btn-group {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.faq-card #display_var .btn {
  flex: 1 1 auto;
  box-sizing: border-box;
  margin: 0 4px 0 0;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  font-size: 12px;
  padding: 6px 10px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.faq-card #display_var .btn:last-child {
  margin-right: 0;
}

.faq-card #display_var .btn:hover {
  background: #e5e7eb;
}

.faq-card #display_var .btn.active,
.faq-card #display_var .btn.active:active,
.faq-card #display_var .btn.active:focus {
  background: #334155;
  color: #ffffff;
  border-color: #334155;
}

/* ========== Leaflet label ========== */
.leaflet-label-custom {
  width: 300px;
  white-space: normal;
  word-wrap: break-word;
}

/*============= Spinner =============*/

/* Map wrapper */
.map-wrap {
  position: relative;
}

/* Overlay shown while raster is loading */
.map-loading {
  position: absolute;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* allow map interaction if desired */
}

/* Spinner */
.map-loading .spinner {
  width: 48px;
  height: 48px;
  border: 6px solid #ffffff;
  border-top-color: #0275D8; /* your spinner.color */
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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


