/* Reset margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Trebuchet MS", sans-serif;
}

/* Map and table layout */
body {
    font-family: "Trebuchet MS", sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Make sure the entire viewport is used */
    overflow: hidden; /* Prevent extra scrolling on the body */
    background-color: #cc00ff; /* Dark background */
    color: #f0f0f0; /* Light text color */
}

.top-container {
    height: 50px;
    z-index: 1500;
}

/* DXsphere Menu */
.dxsphere_navbar a:hover:not(.eskip):not(.dropcontent a):not(.dxsphere_index):not(.hd_directory),
.nav_dropdown:hover .nav_dropbtn {
    background-color: #fff;
    z-index: 1500;
}

.eskip {
    background-color: #ff0000;
    color: #fff;
    z-index: 1500;
}

.dropcontent {
    z-index: 8000;
}

.map_container {
    display: flex; /* Use flexbox to align map and panel side by side */
    height: 50%; /* Map container height */
    width: 100%;
}

#map {
    height: 100%; /* Take up 70% of the width */
    width: 70%;
    position: relative;
}

#map-panel {
    height: 100%; /* Take up 30% of the width */
    width: 30%;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    background-color: #222;
    border-left: 3px solid #cc00ff;
}

#station-statistics {
    border-radius: 5px;
}

#station-statistics h3 {
    margin-top: 0;
    font-size: 1.1em;
}

#station-statistics h4 {
    font-size: 0.95em;
}

#station-statistics ul {
    font-size: 0.8em;
}

.leaflet-control-layers {
    background-color: #1a1a1a; /* Light background with transparency */
    border-radius: 8px; /* Smooth corners */
    padding: 2px; /* Inner spacing */
    box-shadow: 0 0 10px #cc00ff !important;
    color: white;
    font-size: 14px; /* Optional: adjust text size */
}

/* Home Button */
.leaflet-control.home-widget {
    display: flex;
    background-color: #1a1a1a; /* Dark background */
    color: #cc00ff; /* Neon blue text */
    border: 2px solid #444; /* Neon blue border */
    border-radius: 5px;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    width: 35px;
    height: 35px;
    box-shadow: 0 0 5px #cc00ff;
    transition: all 0.3s ease-in-out;
}

.leaflet-control.home-widget:hover {
    background-color: #333;
}

.leaflet-control.home-widget:active {
    transform: scale(0.9); /* Click effect */
}

.leaflet-touch .leaflet-bar a {
    width: 35px;
    height: 35px;
    line-height: 30px;
}

/* Restyle Leaflet controls */
.leaflet-bar a {
    background-color: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    font-size: 0.9em;
    border-radius: 5px;
    box-shadow: 0 0 10px #cc00ff;
}

.leaflet-bar a:hover {
    background-color: #333;
    color: #fff;
}

#table-container {
    margin-top: 3px;
    flex: 1; /* Table takes up remaining space */
    height: 50%; /* Table takes 50% of the screen height */
    overflow-y: scroll; /* Allow vertical scrolling for the table */
    width: 100%;
    background-color: #181818;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2e2e2e; /* Dark background for the table */
}

th,
td {
    padding: 10px;
    border: 1px solid #444; /* Darker border */
}

th {
    background-color: #cc00ff; /* Darker background for headers */
    color: #fff; /* Neon red text for headers */
}

td {
    background-color: #2e2e2e; /* Darker background for table cells */
    color: #fff; /* Lighter text for table cells */
}

tr:hover {
    background-color: rgba(204,0,255, 0.5); /* Ensure all cells in the row change color */
}

tr:hover td {
    background-color: rgba(204,0,255, 0.5); /* Ensure all cells in the row change color */
}

/* Centering specific columns */
th,
td.centered {
    text-align: center;
}

td.city-of-license {
    text-align: left;
}

td {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* Styling for input fields above the table */
#filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Two equal-width columns */
    gap: 15px; /* Space between columns */
    margin-bottom: 15px;
    margin-top: 10px;
}

#filters label {
    display: block; /* Ensure labels take up full width of their column */
    margin-bottom: 5px;
    font-weight: bold;
    color: #cc00ff; /* Neon red color for labels */
}

#filters select,
#filters input {
    padding: 8px;
    font-size: 14px;
    width: 100%; /* Ensure inputs fill their respective columns */
    margin-bottom: 10px;
    background-color: #444; /* Dark background for input fields */
    color: #fff; /* White text for input fields */
    border: 1px solid #555; /* Subtle dark border */
    box-shadow: 0 0 10px #cc00ff;
}

#filters div {
    display: flex;
    flex-direction: column; /* Stack the label and input vertically */
    align-items: center; /* Center the button vertically within the column */
    justify-content: center; /* Ensure vertical centering of content */
}

#filters button {
    display: flex; /* This makes sure it behaves as a flex container */
    align-items: center; /* Ensures the button content is vertically centered */
    justify-content: center; /* Centers the button content horizontally */
}

/* Event description */
#event-description {
    margin-top: 10px;
    font-style: italic;
    color: #aaa; /* Lighter text for event description */
}

/* Highlight table row when clicked */
.highlight {
    background-color: #c236ff; /* Slightly lighter dark for highlighted rows */
    transition: background-color 0.3s ease;
}

/* Table widths */
table {
    table-layout: fixed;
}

#stations-body {
    table-layout: fixed;
    width: 100%;
}

.event {
    width: 10%;
    text-align: center;
}

.date {
    width: 10%;
    text-align: center;
}

.time {
    width: 10%;
    text-align: center;
}

.freq {
    width: 10%;
    text-align: center;
}

.call {
    width: 10%;
    text-align: center;
}

.location {
    width: 25%;
}

.distance {
    width: 8%;
    text-align: center;
}

.HD {
    width: 7%;
    text-align: center;
}

.RDS {
    width: 7%;
    text-align: center;
}

.PI {
    width: 7%;
    text-align: center;
}

.images {
    width: 7%; /* Ensures the column does not collapse */
    text-align: center;
    padding: 0px;
    margin: 0px;
}

.image-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal sections */
    width: 100%;
}

.image-section {
    text-align: center;
    min-height: 20px; /* Prevents collapsing */
}

.dxicon {
    display: flex;
    width: 30px; /* Adjust as needed */
    height: 30px; /* Ensure it fits within row height */
    justify-content: center;
    align-items: center;
}

#stations-body td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Add sorting indicators */
th.sortable {
    cursor: pointer;
}

th.sortable.asc::after {
    content: "▲"; /* Up arrow for ascending */
}

th.sortable.desc::after {
    content: "▼"; /* Down arrow for descending */
}

/* Button styles */
.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* Modal Styling */
#imageModal {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background: #333; /* Dark background for modal */
    padding: 20px;
    border-radius: 12px;
    max-width: 1000px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: #fff; /* White text inside modal */
}

.close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 10px;
    right: 15px;
    height: 30px;
    width: 30px;
    font-size: 30px;
    font-weight: bolder;
    border-radius: 50px;
    cursor: pointer;
    color: #c236ff; /* Neon red close button */
    z-index: 1000;
    background-color: black;
    text-align: center;
}

.container {
    position: relative;
    text-align: center;
}

.mySlides {
    display: none;
}

.active-slide {
    display: block;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
}

.prev:hover,
.next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

.caption-container {
    text-align: center;
    background: #222;
    color: white;
    padding: 10px;
}

.row {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.column {
    width: 10%;
    margin: 5px;
}

.column img {
    width: 100%;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.column img:hover {
    opacity: 0.8;
}

/* Legend */
#legend {
    position: absolute;
    bottom: 30px;
    right: 10px;
    width: 120px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px #cc00ff;
    font-size: 14px;
    z-index: 1000;
}

#legend label {
    display: flex;
    align-items: center;
}

#legend input[type="checkbox"] {
    margin-right: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-marker {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
}

/* Azimuth */

.azimuth-circle {
    position: absolute;
    top: -50%;
    left: 17%;
    border: 2px solid white;
    border-radius: 50%;
    box-sizing: border-box;
}

.azimuth-tick {
    position: absolute;
    background-color: white;
}

.azimuth-label {
    position: absolute;
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
}

#coordinate-display {
    position: absolute;
    bottom: 30px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px #cc00ff;
    color: white;
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 1000;
}

/* Reset Button */
.reset-table {
    display: none;
    justify-content: center;
    align-items: center;
    background-color: #c236ff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.reset-table:hover {
    background-color: #a13fd4;
}

/* Scrollbar */

/* Webkit Browsers */
::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: #888;
}