.map-arcgis .esri-ui .esri-ui-top-left.esri-ui-top-left {
    top: 0 !important;
    right: 20px !important;
    left: auto !important;
}

.map-arcgis{
    position: relative;
    display: flex;
    overflow: hidden;
}

.map-arcgis .map-legend{
    display: flex;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 38px;
    border-radius: 16px;
    border: 2px solid #D3D5D6;
    background: #FFF;
    position: absolute;
    left: 20px;
    top: 30px;
}

.map-arcgis .map-legend .first-row,
.map-arcgis .map-legend .second-row{
    color: #000;
    font-size:28px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    text-align: left;
    
}

.map-arcgis .map-legend .first-row::before{
    content: '';
    display: inline-block;
    background-image: url(../../assets/images/red-pin.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain !important;
    width: 96px;
    height: 96px;
    aspect-ratio: 1/1;
}

.map-arcgis .map-legend .second-row::before{
    content: '';
    display: inline-block;
    background-image: url(../../assets/images/yellow-pin.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain !important;
    width: 96px;
    height: 96px;
    aspect-ratio: 1/1;
}

.map-arcgis .map-legend .legend-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .5s ease;
  padding: 4px 10px;
  border-radius: 16px;
  box-sizing: border-box;
  font-family:"PingLCG",sans-serif;
}

.map-arcgis .map-legend .legend-btn:hover {
    background-color: #E1E1E1;
    cursor: pointer;
}

.map-arcgis .map-legend .legend-btn:not(.active) {
    background-color: #E1E1E1;
}

.map-arcgis .map-search {
  position: absolute;
  top: 30px;
  right: 160px;
  z-index: 9999;
  width: 560px;
}

.map-arcgis .map-search #mapSearchInput{
    display: flex;
    padding: 24px 211px 24px 40px;
    align-items: center;
    align-self: stretch;
    border-radius: 40px;
    border: 2px solid #E1E1E1;
    background: #FFF;
    box-sizing: border-box;
    
}

.map-arcgis .map-search::after {
  content: url(../../assets/images/search.svg);
  position: absolute;
  right: -24px;
  top: 48px; 
  width: 88px;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: 0.6;
  cursor: pointer;          
  pointer-events: auto;   
  background-color: transparent;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
}

.map-arcgis .map-search:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}


.map-arcgis .map-search::before {
  content: "";
  position: absolute;
  right: 88px;       
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: #ddd;
}

.map-arcgis .search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: none;
  max-height: 520px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  border-radius: 12px;
}

.map-arcgis .search-item {
  padding: 20px 24px;
  cursor: pointer;
}

.map-arcgis .search-item:hover {
  background: #f2f2f2;
}

.map-arcgis.search-item .badge {
  float: right;
  font-size: 22px;
  opacity: .7;
}

#mapSearchInput {
  padding-right: 50px;
}

.map-arcgis .search-clear {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: url(../../assets/images/close.svg) no-repeat center;
  background-size: contain;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}


.map-arcgis .search-clear.show {
  opacity: 0.6;
  pointer-events: auto;
}

.map-arcgis .search-clear:hover {
  opacity: 1;
}

.map-arcgis #map-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.map-arcgis #map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 41, 54, 0.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 900;
}

.map-arcgis #viewDiv {
    position: relative;
    height: 1400px!important;
    width: 100%;
    z-index: 1;
}

.map-arcgis #custom-map-popup {
    
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    position: absolute;
    border-radius: 32px;
    border: 2px solid #D3D5D6;
    background: #FAFAFA;
    max-width: 1600px;
    width: 100%;
    height: auto;
    padding: 0px;
    margin: 0 auto;
    z-index: 99999;
    overflow: hidden;             
    transition: opacity 0.5s ease, transform 0.5s ease;
    visibility: hidden;
}

.map-arcgis #custom-map-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        visibility 0s; 
}

.map-arcgis .popup-header{
    display: flex;
    padding: 32px 40px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    border-bottom: 2px solid  #D3D5D6;
    background:  #F5F5F5;    
}

.map-arcgis .popup-header p{
    color: #232936;
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}



.map-arcgis .popup-header p.accidental::before{
    content: '';
    display: inline-block;
    background-image: url(../../assets/images/accidentalPowerOutage.svg);
    background-color: #EA0000;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px;
    border-radius: 16px;
    width: 80px;
    height: 80px;
    padding: 16px;
    margin-right: 16px;
}

.map-arcgis .popup-header p.planned::before{
    content: '';
    display: inline-block;
    background-image: url(../../assets/images/plannedPowerOutage.svg);
    background-color: #EAB300;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px;
    border-radius: 16px;
    width: 80px;
    height: 80px;
    padding: 16px;
    margin-right: 16px;
}

.map-arcgis .popup-header .close-btn {
    content: '';
    background-image: url(../../assets/images/close.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    display: flex;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.5s ease;
}

.map-arcgis .popup-header .close-btn:hover {
    background-color: #E1E1E1;
    border-radius: 3px;
}

.map-arcgis .card {
    display: flex;
    padding: 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    align-self: stretch;
    background: var(--background-bg-light, #FFF);     
}

.map-arcgis .card p{
    margin: 0;
}

.map-arcgis .card .cause-text{

    font-size: 32px;
    font-weight: 800;
}

.map-arcgis .card.accidental .cause-text{
    color: #EA0000;
}

.map-arcgis .card.planned .cause-text{
    color: #EAB300;
}

.map-arcgis .card .card-prev-text{
    align-self: stretch;
    color: #232936;
    font-size: 32px;
    font-weight: 400;
}

.map-arcgis .card .card-text-bold{
    color: #232936;
    font-size: 32px;
    font-weight: 700;
}

.map-arcgis .zoom-link {
  cursor: pointer;
  color: #FF4B00;
  text-decoration: none;
}

.map-arcgis .card a:hover{
  text-decoration: none;
  transition: transform 0.5s ease;
}

@media only screen and (max-width: 3000px) {

    .map-arcgis .esri-ui .esri-ui-top-left.esri-ui-top-left {
        right: 10px !important;
    }

    .map-arcgis #viewDiv {
        height: 700px!important;
    }

    .map-arcgis .map-legend{
        padding: 8px;
        gap: 19px;
        border-radius: 8px;
        border: 1px solid #D3D5D6;
        left: 10px;
        top: 15px;
    }

    .map-arcgis .map-legend .first-row,
    .map-arcgis .map-legend .second-row{
        font-size:14px;
        font-weight: 400;
        gap: 4px;
    }

    .map-arcgis .map-legend .first-row::before{
        width: 48px;
        height: 48px;
    }

    .map-arcgis .map-legend .second-row::before{
        width: 48px;
        height: 48px;
    }

    .map-arcgis #custom-map-popup {
        border-radius: 16px;
        border: 1px solid #D3D5D6;
        max-width: 800px;
        width: calc(100% - 40px);
    }

    .map-arcgis .popup-header{
        padding: 16px 20px;
        border-bottom: 1px solid  #D3D5D6;
    }

    .map-arcgis .popup-header p{
        font-size: 20px;
        font-weight: 700;
    }

    .map-arcgis .popup-header p.accidental::before,
    .map-arcgis .popup-header p.planned::before{
        background-size: 20px;
        border-radius: 8px;
        width: 40px;
        height: 40px;
        padding: 8px;
        margin-right: 8px;
    }
    .map-arcgis .popup-header .close-btn {
        width: 24px;
        height: 24px;
    }

    .map-arcgis .card {
        padding: 20px;
        gap: 16px; 
    }

    .map-arcgis .card .cause-text,
    .map-arcgis .card .zoom-link{
        font-size: 16px;
        font-weight: 400;
    }

    .map-arcgis .card .card-prev-text{
        font-size: 16px;
        font-weight: 400;
    }

    .map-arcgis .card .card-text-bold{
        font-size: 16px;
    }

    .map-arcgis .map-search {
        top: 15px;
        right: 80px;
        width: 280px;
    }

    .map-arcgis .map-search #mapSearchInput{
        padding: 12px 105.5px 12px 20px;
        border-radius: 20px;
        border: 1px solid #E1E1E1;
        
    }

    .map-arcgis .map-search::after {
        right: -12px;
        top: 24px; 
        width: 44px;
        font-size: 18px;
    }

    .map-arcgis .map-search::before {
        right: 44px;       
        top: 8px;
        bottom: 8px;
        width: 1px;
    }

    .map-arcgis .search-results {
        margin: 4px 0 0;
        max-height: 260px;
        box-shadow: 0 6px 20px rgba(0,0,0,.25);
        border-radius: 6px;
    }

    .map-arcgis .search-item {
        padding: 10px 12px;
    }

    .map-arcgis.search-item .badge {
        font-size: 11px;
    }

    .map-arcgis .map-legend .legend-btn {
        padding: 2px 5px;
        border-radius: 8px;
    }

    

}

@media only screen and (max-width: 750px) and (min-width: 700px){
    .map-arcgis .map-legend .first-row::before,
    .map-arcgis .map-legend .second-row::before{
        width: 32px;
        height: 48px;
    }
}

@media only screen and (max-width: 700px){

    .map-arcgis .map-legend{
        gap: 10px;
    }

    .map-arcgis .map-legend .first-row,
    .map-arcgis .map-legend .second-row{
        font-size:12px;

    }

    .map-arcgis .map-legend .first-row::before,
    .map-arcgis .map-legend .second-row::before{
        width: 30px;
        height: 40px;
    }

    .map-arcgis .map-search #mapSearchInput {
        padding: 14px 50.5px 12px 20px;
    }

    .map-arcgis .map-search {
        right: 20px;
    }

    .map-arcgis .map-search::after {
        right: 32px;
    }

    .map-arcgis .map-search::before {
        right: 80px;
    }

    
}

@media only screen and (max-width: 600px){
    .map-arcgis .popup-header p {
        font-size: 18px;
    }

    .map-arcgis .popup-header p.accidental::before,
    .map-arcgis .popup-header p.planned::before{
        width: 36px;
        height: 36px; 
    }

    .map-arcgis .card .card-prev-text,
    .map-arcgis .card .cause-text,
    .map-arcgis .card .zoom-link{
        font-size: 14px;
    }

    .map-arcgis .card .card-text-bold{
        font-size: 14px;
    }

    .map-arcgis .map-search {
        position: absolute;
        left: 10px;
        right: 10px;    
        width: auto;      
    }

    .map-arcgis .map-search #mapSearchInput {
        width: 100%;     
        padding: 12px 60px 12px 20px;
    }

    .map-arcgis .map-legend {
        top: 70px;
    }

    .map-arcgis .esri-ui .esri-ui-top-left.esri-ui-top-left {
        top: 56px!important;
        right: 0px !important

    }

    .map-arcgis .map-search::after {
        right: -7px;
    }

    .map-arcgis .map-search::before {
        right: 44px;
    }

    .map-arcgis .map-legend .first-row,
    .map-arcgis .map-legend .second-row{
        width: 150px;
    }

    .map-arcgis .map-legend .first-row::before,
    .map-arcgis .map-legend .second-row::before{
        width: 24px;
        height: 36px;
    }


    
}

@media only screen and (max-width: 450px){
    .map-arcgis .popup-header p {
        font-size: 16px;
    }

    .map-arcgis .popup-header p.accidental::before,
    .map-arcgis .popup-header p.planned::before{
        width: 32px;
        height: 32px; 
    }

    .map-arcgis .card .card-prev-text,
    .map-arcgis .card .cause-text,
    .map-arcgis .card .zoom-link{
        font-size: 12px;
    }

    .map-arcgis .card .card-text-bold{
        font-size: 12px;
    }
}
