/* Theme tokens */
:root {
    --color-bg: #2c2f33;
    --color-bg-alt: #23272a;
    --color-panel: #3a3d42;
    --color-border: #99aab5;
    --color-text: #ffffff;
    --color-primary: #7289da;
    --color-primary-hover: #5b6eae;
    --color-primary-active: #4f64b5;
}

/* Base layout */
body {
    margin: 0;
    display: flex;
    height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Roboto', sans-serif;
    flex-direction: column;
}

.download-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #121212;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
}

/* Integrated map controls */
.integrated-body #map {
    height: 98vh;
}

.integrated-body .map-button {
    position: absolute;
    top: 10px;
    z-index: 1000;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

.integrated-body #zoomButton {
    left: 70px;
}

.integrated-body #fullWorldButton {
    left: 220px;
}

.integrated-body .map-button:hover {
    background-color: #0056b3;
}

.leaflet-popup-content-wrapper {
    background-color: #fff;
    color: #333;
}

.leaflet-interactive:hover {
    cursor: pointer;
}

/* Tab navigation */
.tab-icon {
    width: 25px;
    height: 25px;
}

.tab-icon-small {
    width: 23px;
    height: 23px;
}

.search-and-filters {
    display: none;
    margin-right: 5px;
}

/* Tab layout */
#mapTab {
    display: flex;
    width: 100%;
    height: 100%;
}

#container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#tabButtons {
    display: flex;
    justify-content: space-around;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.tabButton {
    display: flex;
    flex-grow: 1;
    padding: 4.5px;
    font-size: 20px;
    cursor: pointer;
    text-align: center;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-bottom: none;
    color: var(--color-text);
    align-items: center;
    justify-content: center;
}

.tabButton:first-child {
    border-top-left-radius: 5px;
}

.tabButton:last-child {
    border-top-right-radius: 5px;
}

.tabButton.active {
    background-color: var(--color-primary);
}

.tabButton:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.tabButton:active {
    background-color: var(--color-primary-active);
}

#tabsContainer {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tabContent {
    display: none;
    flex-grow: 1;
    padding: 5px;
    padding-top: 0px;
    overflow-y: auto;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-top: none;
}

.tabContent.active {
    display: block;
}

#mapTab.tabContent.active {
    padding: 0 !important;
}

#mapContainer {
    display: flex;
    flex-grow: 1; /* Allow it to take up remaining space */
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

.igc-overlay {
    display: none;
}

#taskDetailContainer {
    width: 33%;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box;
    border-left: 1px solid var(--color-border);
    background-color: var(--color-bg-alt);
    display: none;
}

#resizer {
    width: 5px;
    cursor: col-resize;
    background-color: #99aab5;
}

/* Buttons */
.button-style {
    background-color: var(--color-primary);
    color: var(--color-text);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 0px;
    margin-bottom: 10px;
    height: 40px; /* Set a fixed height */
    line-height: 20px; /* Adjust line-height to center the text vertically */
}

.button-style:hover {
    background-color: var(--color-primary-hover);
}

.button-style:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.button-style:active {
    background-color: var(--color-primary-active);
}

.button-mini-style {
    background-color: var(--color-primary);
    color: var(--color-text);
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    height: 24px;
    line-height: 1;
    vertical-align: middle;
}

.button-mini-style:hover {
    background-color: var(--color-primary-hover);
}

.button-mini-style:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.button-mini-style:active {
    background-color: var(--color-primary-active);
}

/* Task details */
.task-details {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1em;
}

.task-details h2 {
    font-size: 18px;
    margin-top: 1em;
}

.task-details p {
    margin: 1em 0;
}

.task-details img {
    vertical-align: middle;
}

.task-details ul, .task-details ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.3;
}

.task-details ul li, .task-details ol li {
    margin-bottom: 5px;
}

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

.task-number {
    font-size: 16px;
    font-weight: bold;
}

.task-flags {
    display: flex;
}

.task-details a {
    color: #1da1f2;
    text-decoration: none;
}

.task-details a:hover {
    text-decoration: underline;
}

.task-details a:visited {
    color: #1da1f2; /* Keep the same color after clicking */
}

.header-container {
    display: flex;
    align-items: center;
}

.header-image {
    width: 150px;
    height: auto;
    margin-right: 10px;
}

/* Tool entries */
.tool-entry {
    border: 1px solid #ccc;
    border-radius: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    background-color: var(--color-panel); /* A bit lighter background */
    transition: all 0.3s ease;
}

.tool-entry.collapsible .title {
    cursor: pointer;
}

.tool-entry.collapsed .content {
    display: none;
}

.tool-entry .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--color-panel);
    color: #fff;
    border-bottom: 1px solid #ccc;
}

.tool-entry .content {
    position: relative;
    z-index: 0;
    padding: 10px;
    font-size: 14px;
    background-color: var(--color-panel);
}

.tool-entry .content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cover-url, none) no-repeat center/cover;
    opacity: var(--cover-opacity, 0.25);
    z-index: -1;
}

.tool-entry .title:hover,
.tool-entry .title.highlightGreen:hover,
.tool-entry .title.highlightYellow:hover {
    background-color: var(--color-primary);
}

.tool-entry .title.highlightGreen {
    background-color: #257a25; /* Green highlight background color */
    color: #fff; /* Green highlight text color */
}

.tool-entry .title.highlightYellow {
    background-color: #ffeb3b; /* Yellow highlight background color */
    color: #000; /* Yellow highlight text color */
}

.tool-entry ul, .tool-entry ol {
    margin: 0;
    padding-left: 15px; /* Adjust this value to decrease the indentation */
    line-height: 1.3;
}

.tool-entry ul li, .tool-entry ol li {
    margin-bottom: 3px;
    padding-left: 5; /* Adjust this value if necessary */
}

.collapsible-reset-button {
    background-color: var(--color-primary);
    color: var(--color-text);
    border: 1px solid var(--color-primary-hover);
    border-radius: 3px;
    padding: 8px 8px; /* Smaller padding to match the button size in the image */
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.collapsible-reset-button:hover {
    background-color: var(--color-primary-hover);
}

.link-preview {
    display: flex;
    background-color: #4d5054; /* Ensure content matches the entry background */
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 10px;
    align-items: center;
}

.link-preview img {
    max-width: 120px;
    margin-right: 10px;
}

.preview-details {
    font-size: 0.875em; /* Smaller font size */
    line-height: 1.2em; /* Adjust line height */
}

.preview-details h3 {
    font-size: 1em; /* Smaller title size */
    margin: 0 0 0.5em 0; /* Adjust margin */
}

.preview-details p {
    font-size: 0.875em; /* Smaller description size */
    margin: 0; /* Adjust margin */
}

.youtube-container {
    display: flex;
    align-items: center;
}

.youtube-container iframe {
    margin-right: 10px;
}

/* Add link styles for tools tab to match task details */
.tool-entry a {
    color: #1da1f2;
    text-decoration: none;
}

.tool-entry a:hover {
    text-decoration: underline;
}

.tool-entry a:visited {
    color: #1da1f2; /* Keep the same color after clicking */
}

/* Add link styles for linkss */
.all-links a {
    color: #1da1f2;
    text-decoration: none;
}

.all-links a:hover {
    text-decoration: underline;
}

.all-links a:visited {
    color: #1da1f2; /* Keep the same color after clicking */
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Ensure it is above all other elements */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    width: 100%;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain; /* Ensure the image maintains aspect ratio */
    z-index: 10001; /* Higher than the modal background */
}

/* Caption of Modal Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    z-index: 10001; /* Ensure it is above the background */
}

/* Add Animation */
.modal-content, #caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
    from {
        -webkit-transform: scale(0);
    }

    to {
        -webkit-transform: scale(1);
    }
}

@keyframes zoom {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    z-index: 10002; /* Ensure the close button is on top */
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive image */
.weather-image {
    width: 100%;
    max-width: 700px;
    cursor: pointer;
    transition: 0.3s;
}

.weather-image:hover {
    opacity: 0.7;
}

/* Compass overlay */
.compass-container {
    position: absolute;
    width: 400px;
    height: 400px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed
}

.compass-rose {
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 65%;
}

.wind-arrow {
    width: 60px;
    height: 300px;
    left: 43%;
    top: 13%;
    position: relative;
    opacity: 65%;
}

.wind-direction {
    position: absolute;
    color: #000;
    font-size: 11px;
    font-weight: normal;
    text-align: center;
    top: 50.7%;
    left: 50.5%;
    transform: translate(-50%, -50%);
    cursor: move;
}

/* Map toolbar controls */
#fullWorldButton {
    position: absolute;
    top: 15px;
    left: 50px;
    width: 35px;
    height: 35px;
    z-index: 1200;
    color: white;
    border: none;
    padding: 5px 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    background: rgb(114 137 218 / 47%);
    border: 1px solid #ccc; /* Add a light gray border */
}

#fullWorldButton:hover {
    background: rgb(114 137 218 / 76%); /* Change background color on hover */
    border-color: #888; /* Change border color on hover */
    transform: scale(1.1); /* Scale up the icon on hover */
}

#searchAndFilters {
    width: 300px; /* Fixed width */
    padding-left: 5px;
}

#searchFiltersButton {
    position: absolute;
    top: 15px;
    left: 90px;
    width: 35px;
    height: 35px;
    z-index: 1200;
    color: white;
    border: none;
    padding: 5px 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    background: rgb(114 137 218 / 47%);
    border: 1px solid #ccc; /* Add a light gray border */
}

#searchFiltersButton:hover {
    background: rgb(114 137 218 / 76%); /* Change background color on hover */
    border-color: #888; /* Change border color on hover */
    transform: scale(1.1); /* Scale up the icon on hover */
}

#tableToggleButton {
    width: 300px; /* Fixed width */
}

#tableToggleButton {
    position: absolute;
    top: 15px;
    left: 130px;
    width: 35px;
    height: 35px;
    z-index: 1200;
    color: white;
    border: none;
    padding: 5px 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    background: rgb(114 137 218 / 47%);
    border: 1px solid #ccc; /* Add a light gray border */
}

#tableToggleButton:hover {
    background: rgb(114 137 218 / 76%); /* Change background color on hover */
    border-color: #888; /* Change border color on hover */
    transform: scale(1.1); /* Scale up the icon on hover */
}

#taskControlPanel {
    position: absolute;
    top: 10px;
    right: 65px; /* Adjust this value if needed to fit left of the layer button/menu */
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    padding: 5px;
    display: none; /* Initially hidden */
    z-index: 1000; /* Ensure it appears above map layers */
}

#taskControlPanel button {
    background: rgb(114 137 218 / 47%);
    border: 1px solid #ccc; /* Add a light gray border */
    border-radius: 3px; /* Slightly round the corners */
    font-size: 16px;
    cursor: pointer;
    margin: 0 2px; /* Add horizontal margin to space buttons */
    padding: 5px; /* Add some padding for better clickability */
}

#taskControlPanel button:hover {
    background: rgb(114 137 218 / 76%); /* Change background color on hover */
    border-color: #888; /* Change border color on hover */
    transform: scale(1.1); /* Scale up the icon on hover */
}

#taskControlPanel button img {
    width: 20px;
    height: 20px;
}

.file-icon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    background: white;
    padding: 2px;
    border-radius: 3px; /* Optional: add rounded corners */
    transition: transform 0.2s ease-in-out; /* Add transition for hover effect */
}

.file-icon:hover {
    background: rgb(39 161 231); /* Change background color on hover */
    transform: scale(1.1); /* Scale up the icon on hover */
}

.waypoint-item.selected {
    background-color: #888888;
    border-left: 3px solid #007bff;
}

.wind-layer-item {
    margin: 0;
    padding: 5px;
    cursor: pointer;
}

.wind-layer-item.selected {
    background-color: #888888;
    border-left: 3px solid #007bff;
}

.cloud-layer-item {
    margin: 0;
    padding: 5px;
    cursor: pointer;
}

.cloud-layer-item.selected {
    background-color: #888888;
    border-left: 3px solid #007bff;
}

.community-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.community-section {
    text-align: center;
    margin-top: 20px;
    background-color: #3a3d424d; /* Background color for each community item */
    border-radius: 10px;
    padding-top: 2px;
    padding-bottom: 10px;
    position: relative;
    width: 100%;
}

.community-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff;
}

.community-logos-container {
    overflow-x: auto;
    display: flex;
    align-items: center;
    scrollbar-width: none;
    scrollbar-color: #7289da #2c2f33;
    padding: 0 30px; /* Add padding to make sure the items do not get cut off */
    white-space: nowrap; /* Prevent wrapping of items */
}

.community-logos {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 0 auto; /* Center the items */
}

.community-item {
    display: inline-block; /* Display as inline-block for nowrap */
    flex-direction: column;
    align-items: center;
    height: 220px;
    width: 220px;
    text-align: center;
    padding: 10px;
    background-color: #3a3d42; /* Background color for each community item */
    border-radius: 10px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.community-logo {
    height: 100px; /* Fixed height */
    width: auto;
    border: 2px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px; /* Add margin to separate the logo from the text */
    object-fit: contain; /* Ensure the image fits within the specified height */
}

.community-logo:hover {
    transform: scale(1.1);
    border-color: #7289da;
}

.community-name {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 5px;
    word-wrap: break-word; /* Ensure long words break */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
    white-space: nowrap; /* Ensure text wraps correctly */
    overflow: hidden; /* Hide overflowing text */
    max-width: 100%; /* Ensure the text doesn't exceed the container's width */
}

.community-clubs {
    font-size: 14px;
    color: #aaaaaa;
}

.community-navigation {
    position: absolute;
    top: 65%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1; /* Ensure the buttons are above other elements */
}

.community-navigation.left {
    left: 10px; /* Adjust to ensure the button is within the container */
}

.community-navigation.right {
    right: 10px; /* Adjust to ensure the button is within the container */
}

.scroll-button {
    background-color: #7289da;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #ffffff;
    border-radius: 5px;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.scroll-button:hover {
    opacity: 1;
}

.scroll-button.left {
    transform: rotate(0deg);
}

.scroll-button.right {
    transform: rotate(0deg);
}

.task-count-control {
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    font-size: 14px;
    color: #333;
}

#loadingSpinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Ensures the spinner is on top of other elements */

    display: none;
    flex-direction: column; /* Stack text over image */
    align-items: center; /* Center them horizontally */
    justify-content: center; /* (Optional) center them vertically within the container */
    text-align: center; /* Just in case, to center text */
}

.loading-spinner img {
    width: 50px; /* Adjust size as needed */
    height: 50px;
}

.loading-message {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #000; /* Adjust the color to ensure readability against your background */
}

/* Task grid overlay */
#taskGridOverlay {
    position: absolute;
    top: 75px;
    right: 0;
    width: 100%;
    max-height: 40%;
    background-color: rgba(100, 100, 100, 0.9);
    color: #dcdcdc;
    padding: 10px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    height: 100%; /* Take full height of the intended overlay space */
    overflow: hidden; /* Prevent any overflow outside this element */
    cursor: default; /* Change to default cursor */
    z-index: 9000;
}

#taskGridContainer {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure container uses full height */
}

/* DataTable wrapper to take full height of taskGridContainer */
#taskGridTable_wrapper {
    display: block;
    flex-direction: column;
    height: 100%; /* Full height within container */
    overflow: hidden;
}

#taskGridOverlay .dataTables_scrollHeadInner {
    display: flex !important;
    width: 100% !important;
    height: 45px;
    background-color: #000000c7;
    border-bottom: 1px solid #dddddd;
}

#taskGridTable {
    width: 100% !important;
}

/* Scrollable body section for DataTable rows */
#taskGridTable_wrapper .dataTables_scroll {
    height: 88%; /* Full height within container */
    overflow-y: auto; /* Enable scrolling for rows */
}

/* Scrollable body section for DataTable rows */
#taskGridTable_wrapper .dataTables_scrollBody {
    flex-grow: 1; /* Allow this section to grow and fill available space */
    overflow-y: auto; /* Enable scrolling for rows */
    max-height: 87% !important;
}

#taskGridTable_wrapper .dataTables_info {
    color: #dcdcdc;
}

#taskGridTable_wrapper .dataTables_filter {
    color: #dcdcdc;
}

#taskGridTable_wrapper .dataTables_filter input {
    color: #dcdcdc;
}

table.dataTable thead .sorting {
    color: #d2d2d2;
    text-align: left;
    padding-left: 8px;
}

/* Styling DataTable Rows */
#taskGridTable tbody tr {
    background-color: #2b2b2ba8;
    color: #dcdcdc;
}

#taskGridTable tbody tr:nth-child(even) {
    background-color: #252525cf;
}

#taskGridTable tbody tr:hover {
    background-color: #7289da;
}

/* Style for table text */
#taskGridTable tbody td {
    color: #dcdcdc;
    padding-left: 8px;
    padding-top: 1px;
    padding-bottom: 1px;
    padding-right: 2px;
}

/* Reset background color and text color for sorted column cells to match default row styling */
#taskGridTable tbody td.sorting_1,
#taskGridTable tbody td.sorting_2,
#taskGridTable tbody td.sorting_3 {
    background-color: inherit !important;
    color: inherit !important;
}

/* Style for the selected row in the DataTable */
#taskGridTable tbody tr.selected {
    background-color: #0000ff !important; /* Darker background for the selected row */
    color: #ffffff; /* White text color for visibility */
}

/* Countdown widgets */
.countdown-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.countdown-row {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper {
    position: relative;
}

.countdown-section {
    position: absolute;
    top: 5px;
    right: 5px;
    text-align: right;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    background: #3a3d42;
    font-size: 18px;
}

#taskGridHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px; /* Add padding to match the search box */
    background-color: #1e1e1e; /* Match table header */
    border-bottom: 1px solid #444; /* A subtle separator */
}

.grid-controls {
    display: flex;
    align-items: center;
}

#taskGridInfo {
    font-size: 12px;
    color: #dcdcdc;
    margin-right: 5px; /* Ensures proper spacing from the button */
}

#refreshGridButton {
    background-color: #7289da;
    color: white;
    border: none;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

#refreshGridButton:hover {
    background-color: #0056b3;
}

#searchResultsOnlyContainer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    font-size: 12px;
    color: #dcdcdc;
    user-select: none;
}

#searchResultsOnlyContainer.disabled {
    opacity: 0.5;
}

#searchResultsOnlyContainer input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #7289da;
}

#searchResultsOnlyContainer.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.task-details.markdown-content {
    position: relative;
    background: #23272a;
    color: white;
    z-index: 1;
}

.task-details.markdown-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--task-cover-url) no-repeat center/cover;
    background-size: cover;
    background-position: center;
    opacity: var(--task-cover-opacity, 0.25);
    z-index: -2;
}

.aat-distance-box {
    margin: 6px 0 8px;
    padding: 6px 8px;
    border: 1px solid #3a3d42;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    display: block;
    max-width: fit-content;
    line-height: 1.4;
}

.aat-distance-box .aat-option {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f1f1f1;
    font-size: 14px;
    margin-bottom: 4px;
}

.aat-distance-box .aat-option:last-child {
    margin-bottom: 0;
}

.aat-distance-box input[type="checkbox"] {
    margin-right: 4px;
}

.aat-label-min {
    color: #f7d560;
    font-weight: 500;
}

.aat-label-max {
    color: #f44336;
    font-weight: 500;
}

.user-info-form {
    max-width: 420px;
}

.user-info-field {
    margin-bottom: 1rem;
}

.user-info-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-input-row input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
}

.user-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.missing-indicator {
    color: #ff6b6b;
    font-weight: 700;
}

.missing-indicator--title {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85em;
}

.missing-indicator--field {
    font-size: 0.9em;
    white-space: nowrap;
}


/* Upload container with flex layout */
.upload-container {
    position: absolute;
    top: 5px;
    left: 170px;
    /* Instead of fixed width/height, let content define size */
    width: 160px;
    height: 40px;
    border: 2px dashed #7289da;
    border-radius: 10px;
    padding: 5px;
    text-align: left;
    background: rgba(255, 255, 255, 0.4);
    color: rgba(0,0,0);
    z-index: 999;
    /* When re-enabled, switch display to flex to restore layout */
    /* display: flex;  Enable flex layout */
    align-items: center; /* Vertically center items */
    gap: 8px; /* Space between button and text */
}

/* Change background/border on dragover */
.upload-container.dragover {
    background-color: #3c70c7;
    border-color: #99aab5;
}

/* Hide the file input */
.upload-container input[type="file"] {
    display: none;
}

/* Style the selectFileButton to be positioned within the container, not absolute */
#selectFileButton {
    /* Remove position absolute so it stays in the flex container */
    position: static;
    width: 35px;
    height: 35px;
    color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: rgb(114 137 218 / 47%);
    cursor: pointer;
    padding: 5px;
}

#selectFileButton:hover {
    background: rgb(114 137 218 / 76%);
    border-color: #888;
    transform: scale(1.1);
}

/* Style for the output container */
#output {
    position: absolute;
    top: 200px; /* Adjust spacing below the upload container as needed */
    left: 20px;
    color: #ffffff;
    background-color: #23272a;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
}

#igcOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3); /* or 0 for fully transparent */
    z-index: 9000; /* just below or above other UI as needed */
    display: none; /* hidden by default */
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.igc-submit-hint {
    color: #ffffff;
    font-weight: 700;
    animation: blink 1s steps(2, start) infinite;
}

.igc-submit-hint--attention {
    color: #ffd166;
}

.igc-results-retry-hint {
    margin: 6px 0 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 196, 0, 0.45);
    background: rgba(255, 196, 0, 0.12);
    color: #ffe8a3;
    font-weight: 600;
}
/* =========================
IGC Records Table Styling
(mirroring #taskGridTable)
========================= */

.igc-task-selector-grid-wrapper {
    margin-top: 10px;
    overflow-x: auto;
}

.igc-task-selector-grid {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: #141414;
    color: #e0e0e0;
}

.igc-task-selector-grid th,
.igc-task-selector-grid td {
    padding: 8px 10px;
    border-bottom: 1px solid #2c2c2c;
    text-align: left;
}

.igc-task-selector-grid th {
    background: #1f1f1f;
    font-weight: 600;
}

.igc-task-selector-grid tbody tr:hover {
    background: #1d2d42;
}

.igc-task-selector-grid tbody tr.selected {
    background: #274468;
}

.igc-task-grid-entry a {
    color: #7cb8ff;
    text-decoration: none;
    font-weight: 600;
}

.igc-task-grid-entry a:hover {
    text-decoration: underline;
}

.igc-task-grid-select {
    text-align: center;
    width: 70px;
}

.igcRecordsTable_wrapper .dataTables_info {
    color: #dcdcdc;
}

.igcRecordsTable_wrapper .dataTables_filter {
    color: #dcdcdc;
}

.igcRecordsTable_wrapper .dataTables_filter input {
    color: #dcdcdc;
}

.igcRecordsTable_wrapper .igc-leaderboard-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    flex-wrap: wrap;
}

.igcRecordsTable_wrapper .igc-leaderboard-filter-controls label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #dcdcdc;
    font-weight: 400;
}

.igcRecordsTable_wrapper .igc-leaderboard-filter-controls select {
    background-color: #1f1f1f;
    border: 1px solid #3c3c3c;
    color: #dcdcdc;
    border-radius: 4px;
    padding: 2px 6px;
}

/* Thead styling for sorting icons/text */
.igcRecordsTable thead .sorting {
    color: #d2d2d2;
    text-align: left;
    padding-left: 8px; /* same spacing as #taskGridTable */
}

/* Table rows background & text color */
.igcRecordsTable tbody tr {
    background-color: #2b2b2ba8; /* same as #taskGridTable */
    color: #dcdcdc;
}

.igcRecordsTable tbody tr:nth-child(odd) {
    background-color: #2b2b2ba8 !important;
    color: #dcdcdc !important;
}

.igcRecordsTable tbody tr:nth-child(even) {
    background-color: #252525cf !important;
}

.igcRecordsTable tbody tr:hover {
    background-color: #1da1f245 !important;
}

/* Table cell spacing & color */
.igcRecordsTable tbody td {
    color: #dcdcdc;
    padding-left: 8px;
    padding-top: 1px;
    padding-bottom: 1px;
    padding-right: 2px;
}

/* Ensure sorted columns keep same color as other columns */
.igcRecordsTable tbody td.sorting_1,
.igcRecordsTable tbody td.sorting_2,
.igcRecordsTable tbody td.sorting_3 {
    background-color: inherit !important;
    color: inherit !important;
}

/* IGC tables */
/* Header alignment for DataTables */
.igcRecordsTable.dataTable thead th,
.igcRecordsTable.dataTable thead td {
    text-align: left !important;
}

.igcRecordsTable tbody tr.selected {
    background-color: #0000ff !important; /* or your preferred highlight color */
    color: #ffffff;
}

.igcRecordsTable a {
    color: #1da1f2;
    text-decoration: none;
}

.igc-local-time-mismatch {
    color: #fbbf24;
}

.igc-legend {
    display: none;
    padding: 8px;
    background: #29292a;
    color: #dcdcdc;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid #ffffff;
}

.igcRecordsTable {
    width: 100% !important;
}

/* IGC conversion controls */
.conversion-progress {
    position: fixed;
    right: 16px;
    bottom: 16px;
    padding: 10px 14px;
    background: rgba(34, 34, 34, 0.9);
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    z-index: 100;
}

.igc-convert-wrapper {
    position: relative;
    margin-right: auto;
}

.igc-actions-button {
    width: 80px;
    text-align: center;
}

.igc-convert-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2b2c;
    border: 1px solid #555;
    border-radius: 4px;
    width: 80px;
    display: none;
    z-index: 20;
}

.igc-convert-item {
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #444;
    color: #e0e0e0;
    background: #2a2b2c;
}

.igc-convert-item.disabled {
    color: #7c7c7c;
    cursor: not-allowed;
    background: #1f2937;
}

.igc-convert-item:last-child {
    border-bottom: none;
}

.igc-convert-item:hover {
    background-color: #1da1f245;
}

.igc-filter-toggle {
    margin: 0 8px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #dcdcdc;
}

.igc-filter-toggle input {
    margin-right: 4px;
}

.igc-override-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9500;
    padding: 12px;
}

.igc-override-dialog {
    background: #0b1020;
    color: #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: min(850px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 14px;
    border: 1px solid #334155;
}

.igc-override-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.igc-override-title {
    font-size: 1.1em;
    font-weight: 700;
}

.igc-override-subtitle {
    font-size: 0.9em;
    color: #94a3b8;
}

.igc-override-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #e2e8f0;
}

.igc-override-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.igc-override-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.igc-override-datetime-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.igc-override-datetime-group {
    flex: 1 1 320px;
}

.igc-override-launch-local-note {
    font-size: 0.85em;
    color: #94a3b8;
    margin-top: 4px;
}

.igc-override-datetime-inputs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.igc-override-fullrow {
    grid-column: 1 / -1;
}

.igc-override-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
}

.igc-override-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.igc-override-group-label {
    font-weight: 700;
}

.igc-override-inline-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.igc-override-inline-label {
    gap: 6px;
}

.igc-override-inline-caption {
    font-size: 0.85em;
    color: #cbd5e1;
}

.igc-override-grid input,
.igc-override-grid textarea {
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 4px;
    font: inherit;
    color: #e2e8f0;
    background: #0f172a;
}

.igc-override-duration {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.igc-override-datetime-fields input {
    width: 170px;
}

.igc-override-duration-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.igc-override-date-input {
    width: 150px;
    min-width: 140px;
}

.igc-override-time-input {
    width: 100px;
    min-width: 90px;
}

.igc-override-time-picker {
    display: flex;
    align-items: center;
    gap: 4px;
}

.igc-override-time-hour,
.igc-override-time-minute {
    width: 78px;
}

.igc-override-time-period {
    width: 82px;
}

.igc-override-time-separator {
    font-weight: 700;
}

.igc-override-duration-input {
    width: 68px;
    text-align: center;
}

.igc-override-duration-fields {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.igc-override-duration-fields label {
    flex: 0 1 70px;
}

.igc-override-checkbox {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.igc-override-checkbox input {
    margin-right: 6px;
}

.igc-override-checkbox-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    justify-content: flex-start;
}

.igc-override-number-label {
    gap: 6px;
    align-self: flex-start;
}

.igc-override-number-label input {
    width: 160px;
}

.igc-override-distance-speed {
    column-gap: 14px;
    row-gap: 8px;
    flex: 1 1 260px;
    justify-content: flex-start;
}

.igc-override-duration {
    flex: 1 1 260px;
}

.igc-override-select {
    min-width: 220px;
    width: fit-content;
}

.igc-override-pilot {
    margin-top: 2px;
}

.igc-override-reason textarea {
    resize: vertical;
    max-width: 100%;
}

.igc-override-original {
    border: 1px solid #334155;
    background: #0f172a;
    padding: 12px;
    border-radius: 6px;
}

.igc-override-original-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.igc-override-original-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px 10px;
}

.igc-override-original-grid span {
    display: block;
    font-size: 0.85em;
    color: #cbd5e1;
}

.igc-override-original-grid strong {
    display: block;
    color: #e2e8f0;
}

.igc-override-original-grid strong.igc-override-original-diff {
    color: #ff0000;
}

.igc-override-original-meta {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 0.9em;
}

.igc-override-flag {
    cursor: pointer;
    margin-left: 0px;
    display: inline-block;
}

.igc-flags-cell {
    display: inline-block;
    border-radius: 4px;
    padding: 1px 4px;
}

.igc-primary-flag {
    cursor: pointer;
}

.igc-flag-details-popup {
    position: absolute;
    z-index: 3000;
    max-width: min(320px, calc(100vw - 16px));
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.45);
    padding: 8px 10px;
    font-size: 0.9em;
    line-height: 1.35;
}

.igc-flag-details-line + .igc-flag-details-line {
    margin-top: 3px;
}

.igc-flags-cell-designer {
    background: #ff00db8c;
}

.igc-override-view-only .igc-override-grid,
.igc-override-view-only .igc-override-actions {
    display: none;
}

.igc-override-view-only .igc-override-original {
    margin-top: 0;
}

.igc-override-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.igc-override-actions-right,
.igc-override-actions-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.igc-override-dialog .igc-button-style {
    margin: 0;
}

body.modal-open {
    overflow: hidden;
}

.related-tasks-dialog {
    width: min(860px, calc(100vw - 24px));
    max-height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.related-tasks-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    min-height: 0;
    overflow: hidden;
}

.related-tasks-body #relatedTasksModalForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}

.pm-decoy {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.related-tasks-content {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 8px 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-tasks-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.related-tasks-tab {
    margin: 0;
}

.related-tasks-tab-active {
    box-shadow: inset 0 0 0 1px currentColor;
}

.related-tasks-helper {
    margin: 0;
    font-size: 0.9em;
    color: #94a3b8;
}

.related-tasks-current {
    font-size: 0.9em;
    font-weight: 600;
}

.related-tasks-content input,
.related-tasks-content select,
.related-tasks-content textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.related-tasks-content select {
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 4px;
    font: inherit;
    color: #e2e8f0;
    background: #0f172a;
}

.related-tasks-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.related-tasks-bottom-actions {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.related-tasks-stay-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    white-space: nowrap;
}

.related-tasks-stay-open input {
    width: auto;
    margin: 0;
    display: inline-block;
    flex: 0 0 auto;
}

.related-tasks-stay-open span {
    white-space: nowrap;
}

.related-tasks-buttons {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: 0;
}

.related-tasks-buttons .related-tasks-danger {
    margin-right: 0;
}

.related-tasks-danger {
    margin-right: auto;
}

.related-tasks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.related-tasks-field,
.related-tasks-full {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-tasks-full {
    grid-column: 1 / -1;
}

.related-tasks-label {
    font-size: 0.9em;
    font-weight: 600;
}

.related-tasks-group-mode {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.related-tasks-inline-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.related-tasks-inline-choice input {
    width: auto;
    margin: 0;
}

.related-tasks-content a,
.related-tasks-content a:visited {
    color: #93c5fd;
}

.related-tasks-help-inline {
    font-size: 0.82em;
    color: #94a3b8;
}

.related-tasks-summary,
.related-tasks-preview,
.related-tasks-section-title {
    font-weight: 600;
    margin: 10px 0 6px;
}

.related-tasks-list {
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px;
    background: #0f172a;
}

.related-tasks-preview,
.related-tasks-list {
    max-height: 220px;
    overflow: auto;
}

.related-tasks-list-item {
    padding: 6px 0;
    border-bottom: 1px solid #334155;
}

.related-tasks-list-item:last-child {
    border-bottom: none;
}

.related-tasks-current-item {
    font-weight: 700;
    background: rgba(250, 204, 21, 0.2);
    border-radius: 4px;
    padding-left: 6px;
    padding-right: 6px;
}

.related-tasks-group-top-actions {
    justify-content: flex-start;
}

.related-tasks-relation-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #cbd5e1;
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.2;
}


.related-task-picker-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-task-quick-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-task-quick-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.related-task-quick-input-wrap .related-task-number-quick {
    flex: 1;
}

.related-task-quick-select,
.related-task-change-btn {
    white-space: nowrap;
}

.related-task-selected {
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px;
    background: #111827;
    font-size: 0.9em;
}

.related-task-selected-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-task-picker-error {
    min-height: 1.1em;
}

.related-task-picker {
    position: relative;
}

.related-task-picker-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 2;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0b1020;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.related-task-picker-option {
    width: 100%;
    text-align: left;
    padding: 8px;
    border: 0;
    color: #e2e8f0;
    background: transparent;
    cursor: pointer;
}

.related-task-picker-option:hover,
.related-task-picker-option:focus {
    background: #1e293b;
}

.related-tasks-error {
    color: #fca5a5;
    font-size: 0.82em;
}

@media (max-width: 720px) {
    .related-tasks-grid {
        grid-template-columns: 1fr;
    }
}

.related-tasks-actions .igc-button-style {
    margin: 0;
}

.related-tasks-content input:focus,
.related-tasks-content select:focus,
.related-tasks-tab:focus,
.related-tasks-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.igc-reanalyze-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9500;
    padding: 12px;
}

.igc-reanalyze-dialog {
    background: #0b1020;
    color: #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 14px;
    border: 1px solid #334155;
}

.igc-reanalyze-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.igc-reanalyze-intro {
    margin: 0;
    color: #cbd5e1;
}

.igc-reanalyze-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.igc-reanalyze-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) minmax(140px, 1fr) minmax(140px, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.08);
}

.igc-reanalyze-header {
    font-weight: 700;
    background: rgba(148, 163, 184, 0.16);
}

.igc-reanalyze-cell {
    font-size: 0.95em;
}

.igc-reanalyze-label {
    color: #cbd5e1;
}

.igc-reanalyze-diff {
    color: #facc15;
    font-weight: 700;
}

.igc-reanalyze-note {
    font-size: 0.9em;
    color: #94a3b8;
}

.igc-override-checkbox-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

    .igc-override-checkbox-column .igc-override-checkbox {
        display: flex; /* overrides the grid label style */
        flex-direction: row; /* checkbox and text on one line */
        align-items: center;
        justify-content: flex-start;
        font-weight: 400; /* if you don’t want them bold */
    }

        .igc-override-checkbox-column .igc-override-checkbox input {
            margin-right: 0.35rem;
        }

.igc-legend-btn {
    margin-right: 8px;
}

#latestTopIGCTable .leaderboard-col-pilot {
    min-width: 120px;
    white-space: nowrap;
}

#latestTopIGCTable .leaderboard-col-glider {
    min-width: 150px;
    white-space: nowrap;
}

#latestTopIGCTable .leaderboard-col-speed {
    min-width: 90px;
    white-space: nowrap;
}

#latestTopIGCTable .leaderboard-col-task {
    min-width: 240px;
}

#latestTopIGCTable .leaderboard-col-date {
    min-width: 160px;
    white-space: nowrap;
}

#latestTopIGCTable .leaderboard-col-sim {
    min-width: 110px;
    white-space: nowrap;
}

.igcRecordsTable a:hover {
    text-decoration: underline;
}

.igcRecordsTable a:visited {
    color: #1da1f2;
}

.igc-button-style {
    background-color: #7289da;
    color: white;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 0;
    margin-bottom: 0;
    height: 25px; /* Set a fixed height */
    line-height: 20px; /* Adjust line-height to center the text vertically */
}

.igc-button-style:hover {
    background-color: #0056b3;
}

.igc-button-style:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #7289da;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    cursor: default;
    color: #ffffff !important;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none
}

.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate {
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_length select {
    background-color: #3a3d42 !important;
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_filter input {
    color: white !important;
}

.latest-igc-header {
    text-align: center;
    margin-bottom: 0px;
}

.latest-igc-header h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 1px;
}

.latest-igc-header p {
    font-size: 14px;
    color: #cccccc;
}

.latest-igc-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin: 10px 0;
}

.latest-igc-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.latest-igc-control-group label {
    font-size: 12px;
    color: #cccccc;
}

.leaderboard-filter {
    background-color: #2b2d31;
    color: #f0f0f0;
    border: 1px solid #3a3d42;
    border-radius: 4px;
    padding: 4px 8px;
}

.leaderboard-filter:focus {
    outline: 1px solid #ffb400;
}

.latest-igc-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #2b2d31;
    border-radius: 999px;
    padding: 6px 14px;
}

.latest-igc-mode-toggle .mode-option {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #f0f0f0;
    cursor: pointer;
}

.latest-igc-mode-toggle input[type="radio"] {
    accent-color: #ffb400;
}

.competition-class-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: #3a3d42;
    color: #ffffff;
    font-size: 11px;
}

.leaderboard-result-count {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    color: #cccccc;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    background-color: #2b2d31;
    padding: 5px;
    border-radius: 8px;
    border-bottom: 1px solid #444;
}

.hero-left {
    display: flex;
    align-items: center;
    flex: 1 1 300px;
    gap: 16px;
}

.hero-logo-img-large {
    width: 200px;
    height: auto;
}

.hero-branding h1 {
    font-size: 30px;
    margin: 0;
    color: white;
}

.hero-subtagline {
    font-size: 16px;
    color: #ccc;
    margin: 4px 0;
    font-style: italic;
}

.hero-values {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.hero-values li {
    font-size: 16px;
    color: #aaa;
}

.hero-right {
    flex: 1 1 300px;
    text-align: center;
    min-width: 200px;
}

.hero-prompt {
    font-size: 16px;
    margin-bottom: 12px;
    color: #ddd;
    font-style: italic;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.nav-tile {
    background-color: #7289da;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.nav-tile:hover {
    background-color: #5b6eae;
    transform: translateY(-2px);
}

.hero-discord-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 16px;
    color: #ccc;
    text-align: center;
    flex-wrap: wrap;
}

.hero-discord-cta a {
    background-color: #7289da;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.hero-discord-cta a:hover {
    background-color: #4752c4;
}

.home-platform-stats-section {
    margin: 0 0 14px;
}

.home-platform-stats-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #f0f0f0;
    margin-bottom: 10px;
}

.home-platform-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 10px;
}

.home-platform-stat-card {
    background-color: #23272a;
    border: 1px solid #3a3d42;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.home-platform-stat-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .home-platform-stats-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 700px) {
    .home-platform-stats-grid {
        grid-template-columns: 1fr;
    }

    .home-platform-stat-text {
        white-space: normal;
    }
}

/* Banner container */
#scrollingBanner {
    position: relative;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    /* top/bottom 6px, left 0, right 36px for close button */
    padding: 6px 0;
    padding-right: 36px;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    text-align: center;
    z-index: 1000;
}

/* Default content: ellipsis if too long */
#scrollingBanner .banner-content {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* When it fits: wrap & truly center */
#scrollingBanner .banner-content.centered {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Marquee keyframes */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Scrolling state: remove ellipsis clamp then slide */
#scrollingBanner .banner-content.scrolling {
    /* undo the default clamp rules */
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    /* marquee animation */
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

/* Close button always on top */
#scrollingBanner .close-banner {
    position: absolute;
    top: 4px;
    right: 8px;
    z-index: 10;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
    color: inherit; /* matches banner text color */
}

/* Popular Tasks table */
#popularTasksTable thead th:not(.dt-head-center) {
    text-align: left !important;
}

#popularTasksTable thead th.dt-head-center {
    text-align: center !important;
}

/* New/Updated Tasks table */
#newTasksTable thead th:not(.dt-head-center) {
    text-align: left !important;
}

#newTasksTable thead th.dt-head-center {
    text-align: center !important;
}

/* Only left-align headers in Upcoming Events that are NOT dt-head-center */
#upcomingEventsTable thead th:not(.dt-head-center) {
    text-align: left !important;
}

/* Center any header you�ve tagged with dt-head-center */
#upcomingEventsTable thead th.dt-head-center {
    text-align: center !important;
}
/* Top 5 Contributors (7d) */
#topContrib7Table thead th:not(.dt-head-center),
#topContrib7Table thead td:not(.dt-head-center) {
    text-align: left !important;
}

#topContrib7Table thead th.dt-head-center,
#topContrib7Table thead td.dt-head-center {
    text-align: center !important;
}

#topContrib7Table tbody td.dt-body-center {
    text-align: center !important;
}

/* Top 5 Gliders (7d) */
#topGliders7Table thead th:not(.dt-head-center),
#topGliders7Table thead td:not(.dt-head-center) {
    text-align: left !important;
}

#topGliders7Table thead th.dt-head-center,
#topGliders7Table thead td.dt-head-center {
    text-align: center !important;
}

#topGliders7Table tbody td.dt-body-center {
    text-align: center !important;
}

/* MSFS Versions (7d) */
#msfsVer7Table thead th:not(.dt-head-center),
#msfsVer7Table thead td:not(.dt-head-center) {
    text-align: left !important;
}

#msfsVer7Table thead th.dt-head-center,
#msfsVer7Table thead td.dt-head-center {
    text-align: center !important;
}

#msfsVer7Table tbody td.dt-body-center {
    text-align: center !important;
}

/* Alert overlay */
/* Custom alert overlay */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* The alert box */
.alert-box {
    position: relative;
    background: #707070;
    color: #ffffff;
    padding: 1.5em;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 20%;
    text-align: center;
    font-family: inherit;
}

/* OK button as a column flex container */
.alert-box button {
    margin-top: 1em;
    padding: 0.5em 1em;
    border: none;
    background: #7289da;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hover state */
.alert-box button:hover {
    background: #5b6eae;
}

/* Countdown text inside the button, below “OK” */
.alert-box .alert-countdown {
    margin-top: 0.25em;
    font-size: 1em;
    color: #ccc;
    /* no absolute positioning needed */
}

#popularRangeSelect {
    font-size: 1rem; /* match your H3 size (adjust as needed) */
    background-color: #23272a;
    color: white; /* ← make the text white */
    padding: 0.15em 0.15em; /* breathing room */
    line-height: 1; /* vertically center the text */
    border-radius: 4px; /* soften the corners */
    border: 1px solid #6d6c6c; /* or tweak to a lighter/darker shade */
}

#upcomingEventsTable tbody tr.highlightYellow > td {
    background-color: rgb(255 229 0 / 41%) !important;
}

/* highlightGreen wins over odd/even striping */
#upcomingEventsTable tbody tr.highlightGreen > td {
    background-color: rgb(77 231 77 / 33%) !important;
}

/* Pagination buttons dark theme (similar to your IGCS vibe) */
.dataTables_wrapper .dataTables_paginate.wsg-dark-pager .paginate_button {
    padding: 4px 10px;
    margin: 2px;
    border-radius: 4px;
    background-color: #333;
    color: #eee !important;
    border: 1px solid #444;
}

.dataTables_wrapper .dataTables_paginate.wsg-dark-pager .paginate_button.current {
    background-color: #555 !important;
    color: #555 !important;
    font-weight: 600;
    border-color: #666;
}

.dataTables_wrapper .dataTables_paginate.wsg-dark-pager .paginate_button.disabled {
    opacity: 0.5;
    cursor: default !important;
}

.dataTables_wrapper .dataTables_paginate.wsg-dark-pager .paginate_button:hover {
    background-color: #666 !important;
    color: #7289da !important;
    border-color: #777;
}

.ut-stars .ut-star {
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

.ut-stars .ut-star.filled {
    text-shadow: 0 0 1px rgba(0,0,0,.3);
}

.list-toggle {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.list-toggle .box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 4px;
}
/* === HERO TOP STRIP – mini featured communities under hero buttons === */

.hero-featured-strip {
    margin: 0.25rem auto 0; /* center this block under the buttons */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    max-width: none;
    box-sizing: border-box;
}

.hero-featured-strip-title {
    width: 100%;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

/* Container just holds the scrolling track + arrows */
.hero-featured-strip-container {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden; /* keep everything inside the hero band */
    box-sizing: border-box;
}

/* Scrollable row of mini cards */
.hero-featured-strip-track {
    display: flex;
    justify-content: center; /* center logos when they all fit */
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 1.25rem; /* inset keeps arrows from covering edges */
    scroll-padding-inline: 1.25rem;
    scrollbar-width: none; /* Firefox: hide scrollbar */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-featured-strip-track::-webkit-scrollbar {
    display: none; /* WebKit: hide scrollbar */
}

/* Arrow buttons (same scroll-button class you already use) */
.hero-featured-strip-container .scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.hero-featured-strip-container .scroll-button.left {
    left: 0.35rem;
}

.hero-featured-strip-container .scroll-button.right {
    right: 0.35rem;
}

/* Mini “card” around each logo */
.hero-featured-item {
    flex: 0 0 auto;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.15s ease;
}

/* Hover: small grow + Discord-blue outline */
.hero-featured-item:hover {
    transform: scale(1.05);
    border-color: #7289da;
    box-shadow: 0 0 10px rgba(114, 137, 218, 0.4);
}

/* Logos inside the mini-cards */
.hero-featured-item img {
    display: block;
    height: 60px; /* fixed height */
    width: auto; /* width adapts to aspect ratio */
    object-fit: contain;
    margin: 0 auto 0.2rem auto;
}

.task-events-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: #dcdcdc;
}

.task-events-search-anchor {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.eventFilterPanel {
    display: none;
    background: #1e1f20;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
    color: #dcdcdc;
}

.eventFilterPanelTitle {
    margin-bottom: 6px;
}

.eventFilterPanelControls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eventFilterPanelInputs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.event-filter-number {
    width: 60px;
    background: #1e1f20;
    color: #dcdcdc;
    border: 1px solid #444;
    padding: 2px 4px;
}

.eventFilterPanelButtons {
    display: flex;
    gap: 6px;
}

.event-filter-button {
    padding: 2px 8px;
}

.taskEventsTable {
    width: 100% !important;
}

.difficulty-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.difficulty-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.difficulty-filter-label {
    margin: 0;
}

.difficulty-filter-search {
    flex: 1 1 auto;
    padding: 4px 6px;
    background: #1e1f20;
    color: #dcdcdc;
    border: 1px solid #444;
    border-radius: 4px;
}

.difficulty-checkbox-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-inline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.task-inline-button {
    padding: 4px 8px;
    border-radius: 3px;
}

.port-input {
    width: 90px;
}

.settings-fieldset {
    margin-bottom: 12px;
}

.settings-fieldset:last-child {
    margin-bottom: 0;
}

.port-error {
    display: none;
    color: red;
    margin-top: 4px;
}

.weekly-schedule-day {
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.weekly-schedule-day--today {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.weekly-schedule-today-badge {
    font-size: 0.78em;
    font-weight: 600;
    color: #ffe28a;
    margin-left: 6px;
}

