/* evidence_maps/map_summary.css */

.formContainer {
    background-color: var(--lightest);
    padding: var(--xs-space);
    border-radius: var(--small-border-radius);
    margin-bottom: var(--xs-space);
}

.formContainer form {
    display: flex;
    flex-direction: column;
    align-items: start; 
}


.filterGroupContainer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xs-space);
}

form .filter {
    display: flex;
    flex-direction: column;
    gap: var(--xs-space);
}

form input {
    padding: var(--xs-space);
}

form select[multiple] option {
    border: none;
}

.choices {
    border: 1pt solid var(--medium); /* border color like before */
    border-radius: var(--small-border-radius); /* border radius like before */
    margin-bottom: var(--s-space); /* space below each dropdown */
    background-color: white; /* white background for the dropdown */
    min-width: 240pt;
}

.choices__inner {
    width: unset !important;
    min-height: var(--body-text-size) !important;
    border: none !important;
    background: none !important;
}

.choices__input--cloned {
    background: none !important;  
}

.choices .choices__list--dropdown .choices__item--choice {
    color: var(--body-text-colour); /* text color for dropdown items */
    font-size: var(--body-text-size);
    font-weight: var(--body-text-weight);
    word-wrap: none;
}

.choices__list {
    border-radius: var(--small-border-radius); /* match outer border-radius for the dropdown list */
}

.choices .choices__list--dropdown .choices__item--choice {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.choices .choices__list--dropdown .choices__item__select-text {
    font-size: 0;
}

/* Style for selected items with the remove icon */
.choices .choices__list--multiple .choices__item {
    margin-bottom: 0;
    background-color: var(--phw-royal-blue);
    border: none;
    color: white;
    font-size: var(--body-text-size);
    font-weight: var(--body-text-weight);
}

/* Style for the remove button of selected items */
.choices .choices__list--multiple .choices__item .choices__button {
    font-size: var(--body-text-size);
    color: white;
    margin-left: 0;
    opacity: 1;
}

/* on hover styles for remove button */
.choices .choices__list--multiple .choices__item .choices__button:hover {
    background: none;
    outline: none;
    color: white;
}

form .clearFilters, input[type=submit] {
    font-family: inherit;
    font-size: var(--body-text-size);
    font-weight: var(--body-text-weight);
    padding: var(--xs-space);
    background-color: var(--phw-royal-blue);
    color: white;
    border: none;
    border-radius: var(--medium-border-radius);
    margin: 0;
}

form .clearFilters:hover, input[type=submit]:hover {
    background-color: white;
    color: var(--phw-royal-blue);
    outline: 1pt solid var(--phw-royal-blue);
}

.topScrollbarContainer {
    overflow-x: auto;
}

.topScrollbar {
    height: var(--xs-space);
}

.tableContainer {
    margin-top: 0;
}

table {
    border-spacing: 0;
    padding: var(--xs-space);
    overflow-y: hidden;
}

th {
    border-bottom: none;
    width: var(--s-space);
    background-color: var(--lightest);
    border-bottom: 1pt solid var(--light);
    border-right: 1pt solid var(--light);
    padding: var(--xs-space);
}

.axisLabel {
    background-color: var(--lightest);
    align-items: center;
    border-bottom: none;
    padding: var(--xs-space);
}

.axisLabel h2 {
    margin: 0;
}

td {
    padding: 0;
    border: none;
    height: 1pt; /* value is ignored */
}

table th:nth-child(1),
table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 0; /* Make sure it's higher than the pseudo-element */
}

.evidenceCountContainer {
    height: 100%;
}

.evidencePopupOpenButton {
    font-size: var(--body-text-size);
    font-weight: var(--body-text-weight);
    color: var(--body-text-colour);
    display: block;
    width: 100%;
    height: 100%;
    outline: 0.5pt solid var(--light);
    border-radius: 0;
    background-color: white;
    padding: 0;
    margin: 0;
}

.evidencePopupOpenButton:hover {
    transform: scale(1.10);
    transition: transform 0.2s ease-in-out;
}

.evidencePopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* add a semi-transparent background */
    z-index: 100; /* add a higher z-index than other elements */
    overflow: auto;
    box-sizing: border-box;
    padding: 0 var(--s-space);  /* stops content touching screen edges */
}

.evidencePopup.show {
    display: block;
}

.evidencePopupInner {
    position: relative;
    margin: 5vh auto;
    left: 0;
    right: 0;
    background-color: white;
    border: 1pt solid var(--phw-royal-blue-40);
    border-radius: var(--small-border-radius);
    padding: var(--s-space);
    min-width: 256pt;
    max-width: 512pt;
    width: 90%;
    pointer-events: auto;
}

.evidencePopupHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;    
}

.evidencePopupContent {
    max-height: 60vh; /* Set the maximum height for the content */
    overflow-y: auto; /* Enable vertical scrolling for the content */
}

.evidencePopupCloseButton {
    color: white;
    padding: var(--xs-space);
    margin: 0;
    border-radius: var(--small-border-radius);
    font-size: var(--body-text-size);
    font-weight: var(--body-text-weight);
}

.evidencePopupCloseButton:hover {
    color: var(--phw-royal-blue);
}

.evidencePopupList {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.evidencePopupListItem {
    display: table-row;
}

.evidencePopupListItemLink {
    display: table-cell;
    padding: var(--xs-space);
    color: var(--body-text-colour);
    text-decoration: none;
    border-bottom: 1pt solid var(--phw-royal-blue-40);
    cursor: pointer;
}

.evidencePopupListItemLink:hover {
    filter: brightness(15%);
}
