
/* --------- Multi Step Form Styling ----------- */
.step-title {
    border-bottom: 2px solid #232222;
    margin-bottom: 2rem;
    font-size: 21px;
    font-weight: 700;
    text-align: right;
}


/* --------- General Form Styling ----------- */
#WebFormPanel, #EntityFormPanel {
    border: none !important;
}

.tab-title {
    display: none !important;
}

/* td {
  word-break: break-all;
} */

/* Removing indent from first field on a row 
#WebFormPanel .section tr > td.cell:first-child {
    padding-left: 0 !important;
}

/* Removing indent from last field on a row 
#WebFormPanel .section tr > td.cell:last-child {
    padding-right: 0 !important;
}
*/


/* --------- ArcGIS Widget (mobile-first) ----------- */
#arcgisWidget {
  margin-bottom: 12px;
}

/* Header bar under section title, above map */
.arcgis-map-header{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
}

/* Map container for the ESRI view */
.arcgis-map-container{
  position: relative;
}

#arcgisViewDiv{
  width: 100%;
  height: 60vh;
  min-height: 340px;
  max-height: 650px;
  border-radius: 10px;
  overflow: hidden;
}

/* Legend / layer toggles */
.arcgis-layer-visibility-panel{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* One pill per layer */
.arcgis-layer-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.08);
}

.arcgis-layer-toggle-input{
  margin: 0;
}

.arcgis-layer-swatch{
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.arcgis-layer-legend-label{
  white-space: nowrap;
}

/* Clear button group inside header */
.arcgis-map-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Output panels below the map */
.arcgis-layer-panels{
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arcgis-layer-title{
  font-weight: 600;
  margin-bottom: 4px;
}

.arcgis-layer-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* pill / tag visuals */
.arcgis-tag{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 999px;
  background: rgba(0,0,0,.04);
  font-size: .92rem;
  line-height: 1.4;
}

.arcgis-tag--empty{
  border-style: dashed;
  opacity: .7;
}

/* Mobile adjustments */
@media (max-width: 576px){
  #arcgisViewDiv{ height: 52vh; min-height: 300px; }

  .arcgis-map-header{
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
  }

  .arcgis-map-actions{
    justify-content: flex-end;
  }
}

/* printing configurations */

.only-on-print
{
  display: none;
}

#header-top, #header-bottom
{
  display: flex;
  justify-content: space-between;
}

#header-top
{
  border-bottom: 3px solid black;
  padding-bottom: 10px;
}

#header-bottom
{
  border-bottom: 1px solid black;
  padding-bottom: 10px;
}

@media print{
  .dont-print{
    display: none;
  }
  .only-on-print{
    display: block;
  }

  td div.control input, td div.control select
  {
    border-bottom: 2px solid black!important;
  }

  td div.control textarea
  {
    border: 2px solid black!important;
  }

  td[aria-label="action menu"], th[aria-label="Actions"]
  {
    display: none;
  }

  .break-file-name.file-name-container > div
  {
    width: 20vw;
  }

  .arcgis-map-header,
  .arcgis-map-container
  {
    display: none;
  }

  #arcgisLayerPanels
  {
    display: block;
  }

  .actions
  {
    display: none!important;
  }

  .page-copy .row.sectionBlockLayout > .container
  {
    max-width: 650px;
  }

  .crmEntityFormView table.section>tbody>tr
  {
    display:table-row;
  }

  .crmEntityFormView .cell
  {
    padding: 0 20px 20px;
  }

  .crmEntityFormView table.section>tbody
  {
    display: table-row-group;
  }

  .crmEntityFormView table.section>tbody>tr>td
  {
    display: table-cell;
  }

  .crmEntityFormView table.section
  {
    display: table;
  }

  .control .input-group-text
  {
    background-color: transparent;
    border: 0;
  }

  .control .input-group-text + input + .text-muted
  {
    left: 30px!important;
    z-index: 3;
  }

  .crmEntityFormView table.section>tbody>tr>td label,
  html[dir=ltr] .crmEntityFormView .cell input[type=text], 
  html[dir=ltr] .crmEntityFormView .cell select, 
  html[dir=ltr] .crmEntityFormView .cell textarea,
  html[dir=ltr] .crmEntityFormView .cell .control .file-name-container,
  html[dir=ltr] .crmEntityFormView .cell .control .file-name-container a,
  html[dir=ltr] .crmEntityFormView .cell .control a,
  .subgrid, .subgrid a,
  .arcgis-layer-title,
  .arcgis-layer-tags .arcgis-tag
  {
    font-size: 7pt;
  }

  /* td div.control a.text-primary
  {
    word-break: break-all;
  } */

  fieldset[aria-label="Co-applicants"],
  div[data-name="Location of the Project"],
  div[data-name="tab_Nature_of_Project"],
  div[data-name="Nature Of Project"],
  div[data-name="tab_maps_and_other attachments"],
  fieldset[aria-label="Primary Applicant"] td.subgrid-cell
  {
     break-before: page!important;
  }

  #mnpd_objectreasonforremoval,
  #mnpd_commentslocationinformation, 
  fieldset[aria-label="Location of the Project"] td:last-of-type
  {
    break-after: page!important;
  }
}

/* Optional: keep backing section hidden if script fails late */
table[data-name='location_arcgisinfo'] {
  display: none;
}


#arcgisLayerVisibilityPanel input[type='checkbox']{
  margin-top: 0.1px;
}