/* ---------------- Cappuccino Palette (Hex Key) ---------------- */
/* #4b3832, #854442, #fff4e6, #3c2f2f, #be9b7b */
:root {
  --cappuccino-dark:   #4b3832; /* RGB(75,56,50)   */
  --cappuccino-red:    #854442; /* RGB(133,68,66)  */
  --cappuccino-cream:  #fff4e6; /* RGB(255,244,230)*/
  --cappuccino-ink:    #3c2f2f; /* RGB(60,47,47)   */
  --cappuccino-tan:    #be9b7b; /* RGB(190,155,123)*/
}

/* ---------------- Global Layout ---------------- */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--cappuccino-ink);
}

#mainApp {
  position: relative;
  height: 100%;
  display: block;
}

#viewDiv {
  height: calc(100% - 80px);
  margin-top: 80px;
}

/* ---------------- Overhead Banner ---------------- */

#topBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: 80px;
  padding: 10px 24px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

    background: linear-gradient(
    90deg,
    var(--cappuccino-tan),
    var(--cappuccino-dark)
  );

  color: var(--cappuccino-ink);

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);

  border-bottom: 6px solid var(--cappuccino-red);

  z-index: 50;
}

.ui-banner__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ui-banner__subtitle {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.9;
}

/* Right side of banner holds the nav buttons */
.ui-banner__right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.ui-banner__nav {
  display: flex;
  gap: 12px;
}

/* Banner buttons */
.nav-btn {
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;        /* fully rounded corners */
  border: 1px solid rgba(60, 47, 47, 0.4);
  background-color: var(--cappuccino-red);
  color: var(--cappuccino-cream);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition:
    background-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.nav-btn:hover {
  background-color: var(--cappuccino-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ---------------- Floating Panels ---------------- */

#controls,
#bufferPanel2009,
#bufferPanel2019,
#quickBuffer2009,
#queryPanel {
  position: fixed;
  background: var(--cappuccino-cream);
  padding: 10px;
  border-radius: 6px;
  width: 220px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10;
  color: var(--cappuccino-ink);
  font-size: 13px;
  font-weight: 300;
  border: 3px solid var(--cappuccino-red);
}

#controls {
  top: 120px;
  left: 10px;
}

#bufferPanel2009 {
  top: 120px;
  right: 10px;
}

#bufferPanel2019 {
  top: 340px;
  right: 10px;
}

#quickBuffer2009 {
  top: 560px;
  right: 10px;
}

#queryPanel {
  right: 10px;
  bottom: 30px;
  top: auto;
}

#controls h3,
#controls h4,
#bufferPanel2009 h4,
#bufferPanel2019 h4,
#quickBuffer2009 h4,
#queryPanel h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--cappuccino-dark);
  font-size: 15px;
  /* text-decoration: underline; */
}

/* Panel Buttons */
#buffer2009Btn,
#buffer2019Btn,
#clear2009Btn,
#clear2019Btn,
#runFast2009,
#runFast2019,
#clearFast2009Btn,
#clearFast2019Btn,
#doBtn {
  background-color: var(--cappuccino-red);
  color: var(--cappuccino-cream);
}

#buffer2009Btn:hover,
#buffer2019Btn:hover,
#clear2009Btn:hover,
#clear2019Btn:hover,
#runFast2009:hover,
#runFast2019:hover,
#clearFast2009Btn:hover,
#clearFast2019Btn:hover,
#doBtn:hover {
  background-color: var(--cappuccino-dark);
}

#layerToggle_2019,
#layerToggle_2009 {
  accent-color: var(--cappuccino-red);
}

/* Panel Inputs */
#vp2019,
#dist2019,
#vp2009,
#dist2009,
#attSelect,
#signSelect,
#valSelect {
  background-color: var(--cappuccino-red);
  border: 2px solid var(--cappuccino-ink);
  color: var(--cappuccino-cream);
}

/* Remove Input arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* -------- Widget styling -------- */

/* Match widgets to cappuccino UI */
.esri-widget {
  background-color: var(--cappuccino-cream) !important;
  color: var(--cappuccino-ink) !important;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.esri-widget__heading {
  color: var(--cappuccino-dark) !important;
  font-size: 18px !important;
  /* text-decoration: underline; */
  font-weight: bold !important;
}

/* -------- Legend styling -------- */
/* Hide the field caption line ("ViolentPer1000") */
.esri-legend__layer-caption {
  display: none !important;
}

.esri-legend__symbol-label {
  font-weight: 600;
  color: var(--cappuccino-dark);
  font-size: 13px;
}

.esri-legend__layer-row {
  margin: 4px 0;
}

.esri-legend.esri-widget {
  border: 3px solid var(--cappuccino-red);
}

/* -------- PopUp styling -------- */
.esri-popup__main-container {
  border: 3px solid var(--cappuccino-red);
}

.esri-popup__button {
  background-color: var(--cappuccino-red);
  color: var(--cappuccino-cream);
}
.esri-popup__button:hover {
  background-color: var(--cappuccino-dark);
  color: var(--cappuccino-cream);
}

/* -------- Map UI buttons (Home + Zoom) -------- */
.esri-zoom .esri-widget--button,
.esri-home.esri-widget--button,
.esri-home .esri-widget--button {
  background-color: var(--cappuccino-red) !important;
  color: var(--cappuccino-cream) !important;
  border: none;
  border-radius: 0;                 /* square corners */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Hover / active states */
.esri-zoom .esri-widget--button:hover,
.esri-home.esri-widget--button:hover,
.esri-home .esri-widget--button:hover {
  background-color: var(--cappuccino-dark) !important;
}

.esri-zoom .esri-widget--button:active,
.esri-home.esri-widget--button:active,
.esri-home .esri-widget--button:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ---------------- Footer ---------------- */

#footer {
  position: fixed;  /* overlay on top of the map */
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 244, 230, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  text-align: center;
  color: var(--cappuccino-dark);
  z-index: 100;
}

/* ---------- Map / Resources / About view swap ---------- */
#aboutPanel,
#resourcesPanel {
  display: none;
  height: calc(100% - 80px);
  margin-top: 80px;
  padding: 20px;
  background-color: var(--cappuccino-ink);
  color: var(--cappuccino-cream);
  overflow-y: auto;
}

/* Center headings in About and Resources panels */
#aboutPanel h2,
#resourcesPanel h2 {
  text-align: center;
}

/* Panel titles */
#aboutPanel h2,
#resourcesPanel h2 {
  font-size: 30px;
  font-weight: 700;
}

/* Section subtitles  */
#resourcesPanel h3 {
  font-size: 25px;
  font-weight: 600;
}

/* Body text in panels */
#aboutPanel p {
  font-size: 17px;
  font-weight: 500;
}

.about-inner,
.resources-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Resources tab layout ---------- */

.resources-intro {
  text-align: center;
  margin: 50px 0 50px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--cappuccino-tan);
}

.resource-section {
  margin-top: 32px;
  margin-bottom: 32px;
}

.resource-section h3 {
  text-align: left;
  margin-top: 50px;
  margin-bottom: 35px;
  color: var(--cappuccino-tan);
  font-size: 25px;
  font-weight: 700;
}

.resource-list {
  list-style: none;
  margin: 0 auto;
  padding-left: 0;
  text-align: left;
}

.resource-list li {
  gap: 35px;
  margin-bottom: 35px;
}

.resource-list a {
  color: var(--cappuccino-cream);
  text-decoration: underline;
  font-size: 20px;
}

.resource-list a:hover {
  color: var(--cappuccino-red);
}

/* ---------- About Us Tab layout ---------- */

.about-person {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.about-person img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--cappuccino-red);

}

.about-text h4 {
  margin: 0 0 4px;
  color: var(--cappuccino-tan);
  font-size: 25px;
  font-weight: 700;
}

.about-text p {
  margin: 0;
  color: var(--cappuccino-cream);
  font-size: 16px;
  line-height: 1.4;
}

/* Remove white focus outline around the map view */
.esri-view .esri-view-surface--inset-outline:focus::after,
.esri-view .esri-view-surface:focus::after {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 768px) {
  #topBanner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 8px 16px;
  }

  #viewDiv {
    margin-top: 80px;
    height: calc(100% - 80px);
  }

  .ui-banner__right {
    margin-top: 4px;
    text-align: left;
  }

  .ui-palette-key {
    justify-content: flex-start;
  }

  .ui-banner__nav {
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-btn {
    padding: 6px 16px;
    font-size: 13px;
  }

  #bufferPanel2009 { top: 96px; }
  #bufferPanel2019 { top: 280px; }
  #quickBuffer2009 { top: 464px; }

  #queryPanel {
    right: 10px;
    bottom: 90px;
    top: auto;
  }
}
