/* GOV.DOT.FRA.RAAD.mapStyle.css */
@import "https://js.arcgis.com/4.33/esri/themes/light/main.css";

h2.esri-widget__heading {
  font-size: 16px !important;
  padding: 1px !important;
}

#calciteShell {
  overflow: clip;
  position: static;
  height: 750px;
  width: 100%;
  max-width: 100%;
}

/* Responsive map sizing */
@media (max-width: 1024px) {
  #calciteShell {
    height: 600px;
  }
}

@media (max-width: 768px) {
  #calciteShell {
    height: 450px;
  }
}

@media (max-width: 576px) {
  #calciteShell {
    height: 350px;
  }
}

arcgis-map {
  overflow: clip;
}

calcite-shell-panel {
  overflow: clip;
}

calcite-panel {
  overflow: auto;
}

#WebResource_Location_Map {
  display: flow-root;
}

#viewDiv {
  height: 100%;
  width: 100%;
}

.esri-feature__title {
  background-color: #e6e6e6;
  padding: 0.25em;
}

.esri-feature__size-container {
  background: #f5f5f5;
}

html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 15px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 4px;
  bottom: 1px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Enhanced Mobile Touch Interactions */
@media (max-width: 768px) {
  .switch {
    width: 55px;
    height: 25px;
  }

  .slider:before {
    height: 21px;
    width: 21px;
    left: 4px;
    bottom: 2px;
  }

  input:checked + .slider:before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
  }
}

/* Improve touch targets for mobile */
@media (max-width: 576px) {
  .esri-ui-top-left,
  .esri-ui-top-right,
  .esri-ui-bottom-left,
  .esri-ui-bottom-right {
    padding: 8px;
  }

  .esri-component {
    font-size: 14px;
  }

  .esri-widget--button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Responsive legend and popup positioning */
@media (max-width: 768px) {
  .esri-popup__main-container {
    max-width: calc(100vw - 20px);
  }

  .esri-legend {
    max-height: 200px;
    overflow-y: auto;
  }
}

/* Map container responsive behavior */
#WebResource_Location_Map {
  display: block;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 576px) {
  #WebResource_Location_Map {
    margin: 0 -15px;
    width: calc(100% + 30px);
  }
}

.slider.round {
  border-radius: 16px;
}

.slider.round:before {
  border-radius: 50%;
}

.pencil-cursor {
  cursor: url("/MapSelectIcon.cur"), auto;
}

.eraser-cursor {
  cursor: url("/MapRemoveIcon.cur"), auto;
}

.ms-crm-List-RowSelected {
  background-color: #e6c100;
}

.map-body {
    overflow-wrap: break-word;
}

.map-tooltip {
  border: 3px dashed orangered ;
  position: absolute;
  pointer-events: none;
  background: white;
  color: black;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
  display: none;
  z-index: 9999;
}

.action-button-enabled {
    pointer-events: auto;
}

.section-dark-bg,
.section-dark-bg * {
    color: var(--light-text-color) !important;
}

/* the legend container, collapsed to header height by default */
.custom-legend-box {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 300px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-family: sans-serif;
  user-select: none;

  max-height: 36px;           /* height of header */
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* when open, expand to show everything */
.custom-legend-box.open {
  max-height: 500px;          /* big enough for all sections */
}

/* header */
.custom-legend-header {
  padding: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

/* container for all sections & items */
.custom-legend-content {
  padding: 8px;
}

/* each section */
.custom-section {
  margin-bottom: 8px;
}

/* section title (static) */
.custom-section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* items inside a section */
.custom-legend-item {
  display: flex;
  align-items: center;
  margin: 2px 0;
}

.custom-legend-item img,
.custom-legend-item .html-content {
  margin-right: 6px;
  width: 30px;
  height: 30px;
}

.custom-legend-item-text {
  display: inline-block;
  width: 25px;
  height: 15px;
  color: black;
  font-family: 'Courier New', Courier, monospace;
  text-align:center;
  vertical-align: middle;
}

.custom-legend-item-line {
  display: inline-block;
  width: 25px;
  height: 2px;
  background-color: black;
  vertical-align: middle;
}

.custom-legend-item-box {
  display: inline-block;
  width: 25px;
  height: 10px;
  background-color: black;
  vertical-align: middle;
}

#Subgrid_Existing_Project_Railway_Stations table thead th:nth-child(1),
#Subgrid_Existing_Project_Railway_Stations table tbody td:nth-child(1) {
  display: none;
}

#Subgrid_Existing_Project_Location_Lines table thead th:nth-child(1),
#Subgrid_Existing_Project_Location_Lines table tbody td:nth-child(1) {
  display: none;
}