.detail-page {
    display: flex; 
    height: 100%; 

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Ubuntu', sans-serif;
}

label[for="layer-dropdown"] {
    color: white; 
    font-size: 1.2rem; 
  }


.dropdown-menu {
    position: relative;
    display: inline-block;
}

.dropbtn  {
    background: white;
    color: #444;
    height: 30px !important; 
    width: 250px !important; 
    font-size: 1.4rem; 
    border: none;
    cursor: pointer;
    display: flex; 
    padding: 0; 
    white-space:nowrap;
    border-radius: 3px;
   
    
    
   
}


.dropbtn::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    
    margin-top: -2px; 
    width: 0;
    height: 0;
    
    border-width: 6px 6px 0 6px; 
    border-style: solid; 
    border-color: #a0a0a0 transparent; 
  }

  .dropbtn.active::before {
    border-width: 0 6px 6px 6px;
  }


.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    font-size: 1.4rem;
}

.dropdown-content div {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #ccc; 
}

.dropdown-content div:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media screen and (max-width: 768px) {
    .dropbtn {
        width: 200px !important; 
        font-size: 1.2rem; 
    }

    .dropdown-content {
        width: 200px;
    }

    .dropdown-content div {
        font-size: 1.2rem; 
    }
}



#map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}


.row {
    display: flex; 
    width: 100%; 
   
}
#detail-left, #detail-right {
    flex: 1; 
    display: flex;
    flex-direction: column; 
    height: 100%; 
    padding-left: 10px; 
    padding-right:5px;
}

#detail-right {
    margin-left: 0px;
    position: relative;
    overflow: hidden; 
}

#state-data-list {
    flex-grow: 1; 
    overflow-y: auto; 
}
    

    .map-overlay {
        font: 14px/20px;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        padding: 0;
        z-index: 2;
        text-align: center;
    }

    .map-overlay-inner {
        background-color: rgba(0, 0, 0, 0.6);
        padding:1.6em;
        
        border-radius: 3px;
        box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);

    }

    .map-overlay-inner fieldset {
        border: none;
        padding: 0;
        margin: 0 0 10px;
        border-radius: 3px;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .map-overlay-inner fieldset:last-child {
        margin: 0;
        text-align: center;

    }

    .map-overlay-inner select {
        width: auto;
        flex-grow: 1;
    }

    .map-overlay-inner label {
        margin-right: 10px;
        white-space: nowrap;
    }

    .map-overlay-inner button {
        display: inline-block;
        width: 20px;
        height: 5px;
        border: none;
    }

    .map-overlay-inner button:focus {
        outline: none;
    }

    .custom-popup {
        font-size: 1.4rem;
        padding: 10px;
        max-width: 300px;
        background-color: white;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .custom-popup .mapboxgl-popup-content {
        padding: 15px;
    }

    .custom-popup .popup-row {
        margin-bottom: 8px;
    }

    .custom-popup .popup-label {
        font-weight: bold;
        color: #0b72b7;
        margin-bottom: 2px;
    }

    .custom-popup .popup-value {
        color: #333;
    }

    .map-pop {
        background: #0b72b7;
        border-radius: 2px;
        color: #fff;
        position: absolute;
        width: 93px;
        height: 54px;
        text-align: center;
        font: 13px/15px "Ubuntu", sans-serif;
        padding: 7px 10px 0 10px;
        opacity: 1;
        visibility: hidden;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        z-index:3;
    }

    .map-pop.show {
        visibility: visible;
    }

    .map-pop.hide {
        visibility: hidden;
    }

    .map-pop:after {
        top: 100%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
    }

    .map-pop:after {
        border-color: rgba(11, 114, 183, 0);
        border-top-color: #0b72b7;
        border-width: 10px;
        left: 50%;
        margin-left: -10px;
    }
    

    label[for="layer"] {
        color: white;
        font-size: medium;
    }

    #detail-right {
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }

    #detail-left .list-group-item {
        border: none;
    }

    .list-group-item strong {
        text-decoration: underline;
        text-decoration-thickness: 3px;
        font-weight: bold;
    }

    
    .table {
        width: 100%;
        table-layout: fixed;
        margin-bottom: 1rem;
        color: #212529;
        border-collapse: collapse;
    }


    .table th,
    .table td{
        text-align: center;
        vertical-align: middle;
        font-size:1.6rem;
        padding: 0.5rem; 
        border-top: 1px solid #dee2e6; 
    }


    /*
    .table th,
    .table td {
        padding: 0.75rem;
        vertical-align: middle;
        border-top: 1px solid #dee2e6;
    }*/



    .category-title th {
        background-color: rgba(0, 0, 0, 0.1);
        font-size: 1.6em;
        font-weight: bold;
        text-align: center;
        color: black;
        text-transform: uppercase;
    }
    .category-header td,
    .subcategory-header td {
        background-color: rgba(0, 0, 0, 0.1);
        font-weight: bold;
        font-size: 1.4em;
        text-align: center;
    }


    .state-section h3 {
        width: 100%;
        text-align: center;
        background-color: black;
        color:white;
        padding: 0px;
        margin:0;
        font-size: 1.8em;
        text-transform: uppercase;
        letter-spacing: 1.8px;
        font-weight:700;
    
    }

    .category-description{
       background-color: #f8f9fa;
    }

    .category-description td {
        padding-top: 0;
    }

    .table td.text-truncate {
        max-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    

    .table th:last-child,.table td:last-child {
        padding-top:10px;
        text-align:center;
    }
     

    .table th:nth-child(2),
    .table td:nth-child(2) {
        width: 100px;
        width:auto;
        text-align: center;
        
    }

    .table tr:first-child th,
    .table tr:nth-child(2) td {
        text-align: center;
        
    }

    


    .text-wrap {
        white-space: normal;
        word-wrap: break-word;
        max-width: 300px; /* Adjust this value as needed */
       
    }

    .candidate-names {
        max-height: 100px; /* Adjust this value as needed */
        overflow-y: auto;
    }

    /* Ensure the table doesn't become too wide */
    .table {
        max-width: 100%;
    }

    .category-description-fixed{
        text-align: center;
    }

    .custom-btn {
        padding: 5px 10px; 
        font-size: 8px; 
    }

    .vote-info {
        display:block;
        font-size: 0.8rem; 
        color: #6c757d; 
        white-space: normal; 
        word-wrap:break-word;
    }


    @media (max-width: 768px) {
        .row {
            flex-direction: column-reverse;
        }

        #detail-left, #detail-right {
            width: 100%; 
            margin-left: 0;
            margin-right: 0;
            padding-left: 10px;
            padding-right: 10px;
        }

        #detail-right {
            flex: 1;
            margin-left:10px;
            position: relative;
            overflow: hidden;
            min-height: 300px;
        }

        #detail-left{
            margin-left:5px;
        }


    }
   
   
}



.pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #0b72b7;
    position: absolute;
    transform: rotate(-45deg);
    top: 277px;
    left: 343px;
    margin: -20px 0 0 -20px;
    z-index:5;
  }
  .pin:after {
    content: "";
    width: 14px;
    height: 14px;
    margin: 8px 0 0 8px;
    background: #e6e6e6;
    position: absolute;
    border-radius: 50%;
    z-index:5;
  }
  
  .bounce {
    animation-name: bounce;
    animation-fill-mode: both;
    animation-duration: 1s;
  }
  
  .pulse {
    background: #e6e6e6;
    border-radius: 50%;
    height: 14px;
    width: 14px;
    position: absolute;
    top: 277px;
    left: 343px;
    margin: 11px 0px 0px -12px;
    transform: rotateX(55deg);
    z-index: 5;
  }
  .pulse:after {
    content: "";
    border-radius: 50%;
    height: 40px;
    width: 40px;
    position: absolute;
    margin: -13px 0 0 -13px;
    animation: pulsate 1s ease-out;
    animation-iteration-count: infinite;
    opacity: 0;
    box-shadow: 0 0 1px 2px #0b72b7;
    animation-delay: 1.1s;
  }
  
  @keyframes pulsate {
    0% {
      transform: scale(0.1, 0.1);
      opacity: 0;
    }
  
    50% {
      opacity: 1;
    }
  
    100% {
      transform: scale(1.2, 1.2);
      opacity: 0;
    }
  }
  
  @keyframes bounce {
    0% {
      opacity: 0;
      transform: translateY(-2000px) rotate(-45deg);
    }
  
    60% {
      opacity: 1;
      transform: translateY(30px) rotate(-45deg);
    }
  
    80% {
      transform: translateY(-10px) rotate(-45deg);
    }
  
    100% {
      transform: translateY(0) rotate(-45deg);
    }
  }

  .pin.hide {
    visibility: hidden;
}

.pulse.hide{
    visibility: hidden;
}

  .map-pop {
    background: #0b72b7;
    border-radius: 2px;
    color: #fff;
    position: absolute;
    width: 93px;
    height: 54px;
    text-align: center;
    font: 13px/15px "Ubuntu", sans-serif;
    padding: 7px 10px 0 10px;
    opacity: 1;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index:3;
}

.map-pop.show {
    visibility: visible;
}

.map-pop.hide {
    visibility: hidden;
}

.map-pop:after {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.map-pop:after {
    border-color: rgba(11, 114, 183, 0);
    border-top-color: #0b72b7;
    border-width: 10px;
    left: 50%;
    margin-left: -10px;
}

.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-icon::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
  
