:root {
  /* Consolidated Color Palette */
  --color-primary: #0b6db6;
  --color-secondary: #0fb8fe;
  --color-black: #000000;
  --color-darker: #181818;
  --color-dark: #2a2a2a;
  --color-medium: #333333;
  --color-light: #444444;
  --color-lighter: #848484;
  --color-white: #ffffff;
  --color-white-highlight: #a0e3ff;
  
  --color-okc: #1883c4;
  --color-dallas: #2191d6;
  --color-austin: #48a9e5;
  --color-houston: #63b7ea;
  --color-border: #78cbf4;
  --color-active: #0b5c9b;
	
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Lato', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
  background-color: var(--color-white);
  color: var(--color-medium);
}

/* Side-by-side flexbox layout structure */
.app-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  position: relative;
  padding-top: 55px; 
  min-height: calc(100vh - 55px); 
}

/* ==========================================================================
   MAP STYLES
   ========================================================================= */
.map-viewport {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  padding: 0 20px;

  /* Premium Radial Ambient Light Background */
  background: radial-gradient(
    circle at center, 
    #ffffff 50%, 
    #a2d6f2 80%, 
    #61b3e5 100%
  );
}

.svg-wrapper {
  width: 90%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Positions the interactive state vector layer explicitly over the CSS background graphic */
  position: relative;
  z-index: 2; 
}

#tx-ok-map {
  width: 100%;
  height: 100%;
}

.territory-node {
  cursor: pointer;
  stroke: var(--color-border);
  stroke-width: 2;
  transition: var(--transition-smooth);
}

.region-okc { fill: var(--color-okc); }
.region-dallas { fill: var(--color-dallas); }
.region-austin { fill: var(--color-austin); }
.region-houston { fill: var(--color-houston); }

.territory-node:hover,
.territory-node.hover-active {
  fill: var(--color-primary);
}

.active-region {
  fill: var(--color-active) !important;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.15));
}

/* ==========================================================================
   CITY MARKER STYLES
   ========================================================================== */
.city-marker {
  cursor: pointer;
  fill: var(--color-white) !important;
  transition: var(--transition-smooth);
}

.city-marker:hover,
.city-marker.hover-active {
  fill: var(--color-white) !important;
}

.city-marker.active-region {
  fill: var(--color-secondary) !important;
}

/* Scaled up from 0.9rem to counteract the 62.5% root zoom filter */
.city-label {
  font-size: 1.4rem;
  font-weight: 900;
  fill: var(--color-white-highlight);
  text-transform: uppercase;
  text-anchor: end;
  user-select: none;
  pointer-events: none;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
#sidebar {
  width: 40vw;
  min-width: 380px;
  background-color: var(--color-medium);
  border-left: 1px solid var(--color-lighter);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -1px 0 8px rgba(0, 43, 73, 0.04);
  z-index: 10;
  justify-content: center; 
}

/* Scaled to match main directory heading sizing patterns (16px equivalent) */
.sidebar-heading {
  font-size: 4rem;
  font-weight: 300;
  color: var(--color-white-highlight);
  text-transform: uppercase;
  padding-bottom: 10px;
}

.sidebar-subheading {
  font-size: 1.45rem;
  color: var(--color-white);
  line-height: 1.4;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--color-primary);
}

/* UPDATED: Left accent border restored with primary brand color */
.location-card {
  padding: 14px 15px;
    background-color: transparent;
    border: none;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 1px;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-white);
    transition: all 0.2s ease;
    line-height: 1.4;
    outline: 1px solid var(--color-dark) !important;
}

/* UPDATED: Left accent border shifts dynamically to cyan secondary color on hover */
.location-card:hover,
.location-card.hover-active {
  background-color: var(--color-dark);
  color: var(--color-secondary);
  border-left-color: var(--color-secondary);
  box-shadow: none;
  transform: none;
}

/* Font adjusted to 14px directory standard layout standard */
.location-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: inherit; 
  margin-bottom: 4px;
  line-height: 1.3;
}

/* Font adjusted to 11px uppercase subtitle metadata standard */
.location-card-subtitle {
  font-size: 0.85rem;
  color: var(--color-lighter);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Font adjusted to 12px back text navigation link format */
.back-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--color-lighter);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 2px 0;
  gap: 5px;
  transition: var(--transition-smooth);
}

.back-btn:hover {
  color: var(--color-secondary);
}

.details-card {
  display: flex;
  flex-direction: column;
}

#ui-phone {
  color: var(--color-white);
  text-decoration: none;
  transition: var(--transition-smooth);
}

#ui-phone:hover {
  color: var(--color-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

h2 {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-white-highlight);
  margin: 15px 0;
  line-height: 1.3;
}

.region-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-dark);
  color: var(--color-secondary);
  border: 1px solid var(--color-primary);
}

.info-group {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-light);
  padding-bottom: 8px;
}

/* Small labels set to 10px uppercase format */
.info-label {
  font-size: 1.0rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-lighter);
  letter-spacing: 0.06em;
}

/* Profile field data targets set at a readable 14px line text system */
.info-value {
  font-size: 1.4rem;
  color: var(--color-white);
  font-weight: 500;
  line-height: 1.5;
  padding: 4px 0;
}

.map-container-wrapper {
  border-bottom: none;
}

/* Contact button set at a readable 13px bold format text size configuration */
.action-button {
  display: inline-flex;
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 12px;
  border-radius: 3px;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  justify-content: center;
  align-items: center;
  transition: all 0.12s ease-in-out;
  margin-top: 14px;
}

.action-button:hover {
  background-color: var(--color-secondary);
  color: var(--color-darker);
}

@keyframes componentSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-up {
  animation: componentSlideUp 0.35s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.hidden {
  display: none !important;
}

@media (max-width: 992px) {
  .app-layout {
    flex-direction: column;
    height: auto; 
    min-height: calc(100vh - 55px);
    padding-top: 55px; 
  }

  .map-viewport {
    width: 100%;
    height: 55vh; 
    min-height: 450px;
  }

  .svg-wrapper {
    width: 100%;
    height: 100%;
  }

  #tx-ok-map {
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: visible;
  }

  #sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--color-light);
    padding: 30px 20px;
    justify-content: flex-start; 
  }

  .sidebar-heading {
    font-size: 2rem; 
    margin-bottom: 16px;
  }

  .city-label {
    font-size: 2rem; 
  }
}

/* ==========================================================================
   MOBILE & SMALL TABLET LANDSCAPE VIEW (WITHOUT DISTURBING DESKTOP)
   ========================================================================= */
@media (max-width: 992px) and (orientation: landscape) and (max-height: 520px) {
  .app-layout {
    flex-direction: row; 
    height: calc(100vh - 55px); 
    min-height: 100vh;
    overflow: hidden; 
  }

  .map-viewport {
    width: 50%; 
    height: 100%; 
    min-height: auto;
    padding: 10px;
  }

  .svg-wrapper {
    width: 100%;
    height: 100%;
  }

  #tx-ok-map {
    width: auto;
    height: 80%;
    max-width: 100%;
    max-height: 100%; 
  }

  #sidebar {
    width: 50%; 
    min-width: 50%;
    height: 100%;
    border-top: none;
    border-left: 1px solid var(--color-light); 
    padding: 15px;
    overflow-y: auto; 
  }

  .sidebar-heading {
    font-size: 1.5rem; 
    margin-bottom: 10px;
  }
  
  .sidebar-subheading {
    font-size: 0.9rem;
    margin-bottom: 12px; 
  }
  
  .location-card {
    padding: 7px 11px;
  }
  
  .info-block {
    margin-bottom: 12px;
  }

  .action-button {
    margin-top: 8px;
    padding: 8px 12px; 
  }
}