/* Tabs Navigation Styles */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0px;
    white-space: nowrap;
}

.tab-button {
    padding: 10px 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    cursor: pointer;
    position: relative;
    top: 1px;
    color: #333; /* Darker text color for better contrast */
    font-weight: 500; /* Medium font weight for better visibility */
    transition: all 0.2s ease; /* Smooth transition for hover effects */
}

.tab-button.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    font-weight: bold;
    color: #2c3e50; /* Darker color for the active tab */
}

.tab-button:hover:not(.active) {
    background-color: #f0f0f0;
    color: #000; /* Darker text on hover for better contrast */
}

/* Tab Content Styles */
.tab-content {
    min-height: 300px; /* Ensure minimum height for content area */
}

.tab-pane {
    display: none;
    padding: 1px 0;
}

.tab-pane.active {
    display: block;
}

/* Remove redundant section titles and borders since we have tabs now */
.location-settings, .api-settings, .radio-settings {
    border-top: none;
    padding-top: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 22px; 
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.options-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0;
    min-width: 100px;
}

.options-button:hover {
    background-color: #2980b9;
}

.dashboard {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 120px);
}

/* Update the sidebar styling to maintain correct width */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 300px; /* Fixed width for sidebar */
    overflow: hidden;
}

.options-panel, .passes-panel, .roves-panel {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    margin-bottom: 15px;
}

.passes-panel {
    height: 70%;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.roves-panel {
    height: 30%;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
    /* Remove sidebar from the content area */
    border: none;
}

.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.map-container {
    flex: 1;
    min-height: 500px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

h2 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

h3 {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.25rem;
    font-weight: bold;
}

input[type="number"], input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#satellite-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.satellite-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    padding: 0.25rem;
}

.satellite-item:hover {
    background-color: #f8f8f8;
}

.satellite-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.satellite-item label {
    margin-left: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    flex-grow: 1;
}

#upcoming-passes, #upcoming-roves {
    overflow-y: auto;
    max-height: calc(100% - 40px); /* Account for heading */
}

#upcoming-passes {
    margin: 0px;
    padding: 0px;
}   

.pass-item, .rove-item {
    padding: 8px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #4a76ce;
}

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

.pass-item:hover, .rove-item:hover {
    background-color: #e9ecef;
}

.pass-active {
    background-color: #dff0d8;
    border-left: 3px solid #5cb85c;
}

.pass-upcoming {
    background-color: #fff3cd; /* Light orange */
    border-left: 3px solid #ffc107; /* Darker orange */
}

.pass-visible {
    background-color: #d1ecf1; /* Light blue */
    border-left: 3px solid #17a2b8; /* Darker blue */
}

.pass-active {
    background-color: #d4edda; /* Light green */
    border-left: 3px solid #28a745; /* Darker green */
}

.pass-satellite-name {
    font-weight: bold;
}

.pass-time {
    color: #666;
    font-size: 0.9rem;
}

.pass-details {
    font-size: 0.8rem;
    color: #777;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem;
    background-color: #2c3e50;
    color: white;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ccc;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.search-container {
    margin-bottom: 1rem;
}

#satellite-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.satellite-selector {
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-actions {
    display: flex;
    margin-top: 10px;
}

#use-geolocation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #4CAF50;
    margin-top: 0;
}

#use-geolocation:hover {
    background-color: #45a049;
}

#use-geolocation svg {
    width: 16px;
    height: 16px;
}

/* Fix for the svg point element which isn't standard */
#use-geolocation svg point {
    fill: white;
}

.satellite-dot {
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
}

.satellite-label {
    font-size: 12px;
    white-space: nowrap;
    color: #fff;
    text-shadow: 1px 1px 1px #000;
    margin-left: 12px;
    margin-top: -10px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 9999;
}

/* Manual TLE Input Dialog */
.error-message {
    color: #d9534f;
    background-color: #f2dede;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    display: none;
}

.format-example {
    font-family: monospace;
    background-color: #f8f8f8;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    white-space: pre-wrap;
    font-size: 0.9em;
    margin: 10px 0;
}

#tles-textarea {
    width: 100%;
    padding: 10px;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
    margin-bottom: 10px;
}

#manual-tle-input {
    z-index: 1100;
}

.manual-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.manual-close:hover {
    color: #ccc;
}

/* Satellite Info Panel */
.info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    font-size: 14px;
    display: none;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.debug-button {
    padding: 4px 8px;
    font-size: 12px;
    height: auto;
    margin: 0;
    background-color: #34495e;
    color: white;
    border: 1px solid #456789;
}

.debug-button:hover {
    background-color: #456789;
}

.close-info-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    margin: 0;
    padding: 0 5px;
}

.close-info-btn:hover {
    color: #ddd;
}

.info-body {
    padding: 10px 15px;
}

.info-section {
    margin-bottom: 12px;
}

.info-section h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #555;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 5px;
    column-gap: 10px;
}

.visible-indicator {
    color: #4CAF50;
    font-weight: bold;
}

.not-visible-indicator {
    color: #F44336;
}

/* Satellite marker styling */
.satellite-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.satellite-dot {
    width: 8px;
    height: 8px;
    background-color: #FF4500;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.satellite-label {
    font-size: 10px;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 3px;
    border-radius: 2px;
    margin-top: 2px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Highlighted satellite styles */
.satellite-dot.highlight-pulse {
    width: 10px;
    height: 10px;
    background-color: #FF9800;
    border: 2px solid white;
    box-shadow: 0 0 10px #FF9800;
    animation: pulse 1.5s infinite;
}

.satellite-label.highlight {
    font-weight: bold;
    color: #FF9800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Satellite Info Panel */
.satellite-info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 300px;
    z-index: 1000;
    display: none;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
}

.info-header h3 {
    margin: 0;
    color: white;
}

.close-button {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: white;
    padding: 0 5px;
}

.close-button:hover {
    color: #ddd;
}

.info-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.info-content table {
    width: 100%;
    border-collapse: collapse;
}

.info-content table td {
    padding: 5px 2px;
    border-bottom: 1px solid #eee;
}

.info-content table td:first-child {
    font-weight: bold;
    width: 40%;
}

.pass-item {
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.pass-item:hover {
    background-color: #f0f0f0;
}

/* Countdown timer for upcoming passes */
.pass-countdown {
    position: absolute;
    top: 8px;
    right: 12px;
    background: #222;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: bold;
    z-index: 2;
    opacity: 0.92;
    pointer-events: none;
    transition: background 0.2s;
}

.pass-active .pass-countdown {
    background: #28a745;
    color: #fff;
}

/* Add to your existing CSS file */

/* Roves Panel Styling */
.roves-panel {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#upcoming-roves {
    margin: 0px;
    padding: 0px;
}

.rove-item {
    padding: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #4a76ce;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.rove-item:hover {
    background-color: #e9ecef;
}

.rove-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.rove-callsign {
    color: #1e3799;
}

.rove-grid {
    color: #fff;
    background-color: #3498db;
    border-radius: 10px;
    padding: 5px;
}

.rove-details {
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
}

.rove-satellite {
    font-weight: 500;
    color: #000000;
    border-radius: 5px;
    background-color: #dbdbdb;
    padding: 5px;
}


.rove-time {
    font-style: italic;
}

.rove-mode {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: #eee;
    font-size: 0.8em;
    margin-left: 5px;
}

/* API Settings Styling */

.api-form {
    margin-top: 10px;
}

/* Add styles for the time and satellite line in roves display */

.rove-time-sat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.rove-time {
    font-style: italic;
    font-size: 0.9em;
    color: #555;
}

.rove-satellite {
    font-weight: 500;
    color: #1e3799;
    text-align: right;
}

/* Fix for satellite labels position on map */
.leaflet-div-icon {
    background: transparent;
    border: none;
}

.satellite-label {
    position: absolute;
    width: max-content;
    text-align: center;
    transform: translate(-50%, -50%); /* Center the label */
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    pointer-events: none;
}

.satellite-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.satellite-label {
    position: absolute;
    left: 50%;
    top: -12px; /* Position label above the marker */
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    pointer-events: none;
    text-align: center;
}

.satellite-marker-icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.satellite-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.satellite-label {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    pointer-events: none;
    text-align: center;
}

.satellite-marker-container {
    position: relative !important;
    display: block !important;
    border: none !important;
    background: none !important;
}

.satellite-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 0;
    left: 0;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.satellite-label {
    position: absolute;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    pointer-events: none;
    left: 0;
    top: -2px;
    display: none;
}

.satellite-label-container {
    background: none !important;
    border: none !important;
}

.satellite-name-centered {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    color: #000;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    pointer-events: none;
    text-align: center;
}

.rove-item.unworkable {
    border-left-color: #999;
    background-color: #f8f8f8;
    opacity: 0.8;
}

.rove-item.unworkable .rove-callsign {
    color: #666;
}

.rove-item.unworkable .rove-grid {
    color: #777;
}

/* Add Schedule button styles */

.schedule-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0;
    min-width: 100px;
}

.schedule-button:hover {
    background-color: #218838;
}

/* Schedule Modal Styles */
.schedule-controls {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.schedule-table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.schedule-table th {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.schedule-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.schedule-table tr:hover {
    background-color: #f1f1f1;
}

.schedule-table .pass-active {
    background-color: #d4edda;
}

.schedule-table .pass-upcoming {
    background-color: #fff3cd;
}

.schedule-table .pass-visible {
    background-color: #d1ecf1;
}

.refresh-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    align-self: flex-end;
}

.refresh-button:hover {
    background-color: #138496;
}

#schedule-satellite-filter,
#schedule-days {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.status-label {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-align: center;
}

.status-active {
    background-color: #28a745;
}

.status-upcoming {
    background-color: #ffc107;
    color: #212529;
}

.status-visible {
    background-color: #17a2b8;
}

.status-normal {
    background-color: #6c757d;
}

/* Polar Radar Panel */
.polar-radar-panel {
    position: absolute;
    bottom: 20px;
    left: 440px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 100%; /* Allow the panel to take full width */
    height: 100%; /* Allow the panel to take full height */
    max-width: 500px; /* Optional: Set a maximum width */
    max-height: 400px; /* Optional: Set a maximum height */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
    min-width: 300px; /* Ensure minimum width */
    min-height: 300px; /* Ensure minimum height */
}

.polar-radar-content {
    padding: 0; /* Remove padding to maximize space for the canvas */
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#polar-radar-chart {
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure it doesn't exceed container width */
    max-height: 100%; /* Ensure it doesn't exceed container height */
    display: block; /* Center the canvas */
    margin: auto; /* Center the canvas */
}

/* Sked Planning Styles */
.sked-planning-controls {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#sked-observer2-coords {
    font-size: 0.8rem;
    color: #666;
    margin-top: 3px;
}

.small-text {
    font-size: 0.8rem;
    color: #666;
}

.sked-planning-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.sked-planning-table th,
.sked-planning-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.mutual-pass-active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.mutual-pass-upcoming {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
}

/* Match the existing schedule button styles */
#open-sked-planning {
    background-color: #28a745;
    margin-right: 10px;
}

#open-sked-planning:hover {
    background-color: #218838;
}

/* Add at the end of the file */

/* CSN Technologies S.A.T Panel */
.sat-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;  /* Changed from right: 10px to left: 20px */
    width: 400px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 500;
}

.sat-panel .info-header {
    background-color: #3f51b5;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    gap: 10px;
}

.sat-panel .info-header h3 {
    margin: 0;
    font-size: 1rem;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sat-panel-content {
    padding: 10px;
    overflow-y: auto;
    max-height: 300px;
}

.sat-status {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 4px;
}

.sat-status.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.sat-status.error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.sat-status.pending {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.sat-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    border-left: 4px solid #3f51b5;
}

/* SAT Panel Buttons */
.sat-panel-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
}

.sat-button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin: 0;
}

.sat-button.sat-enabled {
    background-color: #4caf50;
    color: white;
}

.sat-button.sat-disabled {
    background-color: #f44336;
    color: white;
}

.sat-button.sat-center {
    background-color: #2196f3;
    color: white;
}

.sat-button:hover {
    opacity: 0.9;
}

.button-pressed {
    transform: scale(0.95);
}

/* Rotator info styling */
.sat-rotator-info {
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #2196f3;
}

.sat-rotator-info table {
    width: 100%;
}

.sat-rotator-info td:nth-child(odd) {
    font-weight: bold;
    width: 25%;
    text-align: right;
    padding-right: 5px;
}

.sat-rotator-info td:nth-child(even) {
    width: 25%;
    text-align: left;
}

.sat-panel-buttons-secondary {
    margin-top: 6px;
    border-top: none;
    padding-top: 0;
}

.sat-button.sat-park {
    background-color: #ff9800;
    color: white;
}

.sat-button.sat-park:hover {
    background-color: #f57c00;
}

/* Transponder information styling */
.sat-transponder-info {
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #ff9800;
}

.sat-transponder-info h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

#sat-transponder-desc {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    font-style: italic;
}

.freq-grid {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    grid-gap: 5px;
    align-items: center;
}

.freq-label {
    font-weight: bold;
    color: #555;
}

#sat-uplink-freq, #sat-downlink-freq {
    font-family: monospace;
    font-size: 15px;
    color: #1976d2;
    font-weight: 500;
}

#sat-uplink-mode, #sat-downlink-mode {
    background-color: #e0e0e0;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    text-align: center;
    color: #333;
    font-weight: bold;
}

/* Help Button and Modal Styles */
.help-button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0;
    min-width: 100px;
}

.help-button:hover {
    background-color: #3e8e41;
}

.help-content {
    max-height: 70vh;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 18px;
}

.help-section p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.help-section ul, 
.help-section ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-section li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.help-section strong {
    font-weight: bold;
    color: #333;
}

.calendar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    color: #333;
    transition: background-color 0.2s;
}

.calendar-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.calendar-link svg {
    width: 16px;
    height: 16px;
}

/* Center the calendar icon in its table cell */
#sked-planning-table td:last-child {
    text-align: center;
}

/* CSN panel button styling */
.sat-button-header {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0;
    min-width: 100px;
}

.sat-button-header:hover {
    background-color: #2980b9;
}

.sat-button-header:active {
    background-color: #1c6ea4;
}

#sat-transponder-select {
    width: 100%;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.panel-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.minimize-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    color: white;
}

.minimize-button:hover {
    color: #ddd;
}

.satellite-info-panel.minimized,
.sat-panel.minimized {
    height: auto;
}

.satellite-info-panel.minimized .info-content,
.sat-panel.minimized .sat-panel-content,
.sat-panel.minimized .sat-panel-buttons {
    display: none;
}

.satellite-info-panel.minimized .minimize-button,
.sat-panel.minimized .minimize-button {
    transform: rotate(180deg);
}

/* AMSAT Status Button */

/* AMSAT Status Dialog */
#amsat-status-dialog .modal-content {
    max-width: 400px;
}

#amsat-status-dialog .form-group {
    margin-bottom: 15px;
}

#amsat-status-dialog label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#amsat-status-dialog input[type="text"],
#amsat-status-dialog select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#amsat-status-dialog #amsat-satellite-name,
#amsat-status-dialog #amsat-gridsquare,
#amsat-status-dialog #amsat-time {
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

#amsat-status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

#amsat-status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#amsat-status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* APRS Panel Styles */

#open-aprs {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0;
    min-width: 100px;
}

#open-aprs:hover {
    background-color: #2980b9;
}

#open-aprs:active {
    background-color: #1c6ea4;
}

.aprs-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    max-width: 90%;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.aprs-panel .info-header {
    cursor: move; /* Show move cursor on header */
}

.aprs-panel.minimized .aprs-panel-content {
    display: none;
}

.aprs-panel.minimized {
    max-height: unset;
    transform: none;
}

.aprs-panel-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.aprs-messages {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    display: none;
}

.aprs-message {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
}

.aprs-message.sent {
    background-color: #e3f2fd;
}

.aprs-message.received {
    background-color: #f1f8e9;
}

.aprs-message.error {
    background-color: #ffebee;
    color: #c62828;
}

.aprs-macros {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.aprs-macros .aprs-button {
    flex: 1;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

.aprs-macros .aprs-button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aprs-macros .aprs-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.aprs-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;  /* Align buttons to the right */
    width: 100%;  /* Ensure the container takes full width */
    grid-column: 1 / -1;  /* Make it span all columns in the grid */
}

.aprs-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;  /* Ensure full width */
}

.aprs-table-container {
    margin-top: 20px;
    width: 100%;
    overflow-x: auto;
}

.aprs-table {
    width: 100% !important;
    margin-bottom: 10px;
}

.aprs-table th,
.aprs-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.aprs-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.aprs-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.aprs-table tr:hover {
    background-color: #f1f1f1;
}

/* DataTables specific styles */
.dataTables_wrapper {
    width: 100%;
}

.dataTables_filter {
    margin-bottom: 10px;
}

.dataTables_filter input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.dataTables_info {
    margin-top: 10px;
    color: #666;
}

.dataTables_paginate {
    margin-top: 10px;
    text-align: right;
}

.dataTables_paginate .paginate_button {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}

.dataTables_paginate .paginate_button.current {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.dataTables_empty {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Ensure the table container takes full width */
.aprs-table-container {
    margin-top: 20px;
    width: 100%;
    overflow-x: auto;
}

/* Force DataTables to respect container width */
.aprs-table-container .dataTables_wrapper {
    width: 100% !important;
}

.aprs-table-container .dataTables_scrollBody {
    width: 100% !important;
}

.aprs-table-container table.dataTable {
    width: 100% !important;
    margin: 0 !important;
}

/* Add styles from cavas/style.css */
#map-container {
    position: relative; /* Needed for absolute positioning of the canvas */
    width: 100%; /* Use container width */
    /* Maintain aspect ratio (1800 / 3600 = 0.5) */
    aspect-ratio: 3600 / 1800;
    background-image: url('../assets/worldmap/worldmap_blue.jpg');
    background-size: contain; /* Scale the image nicely */
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ccc;
    overflow: hidden; /* Hide parts of canvas that might overflow if not perfectly scaled */
}

#satellite-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* The canvas drawing will be scaled by the browser based on container size */
}

/* Style for the new connection badge */
#sat-connection-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    flex-shrink: 0; /* Prevent badge from shrinking */
}

#sat-connection-badge.status-connected {
    background-color: #4caf50; /* Green for connected */
}

#sat-connection-badge.status-error {
    background-color: #f44336; /* Red for error */
}

/* Adjust panel controls alignment if needed */
.sat-panel .panel-controls {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Prevent controls from shrinking */
}

/* QTRigDoppler Panel Styles */
.qtrigdoppler-panel {
    position: absolute;
    bottom: 20px;
    left: 100px;
    width: 450px;
    max-height: 400px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 900;
}

.qtrigdoppler-panel .info-header {
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    cursor: grab;
}

.qtrigdoppler-panel .server-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qtrigdoppler-panel .server-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: red;
}

.qtrigdoppler-panel .server-status.connected {
    background-color: #4CAF50;
}

.qtrigdoppler-panel-content {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(80vh - 40px);
    background: none;
}

.qtrigdoppler-panel .control-section {
    background-color: #fafbfc;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 12px;
}

.qtrigdoppler-panel .button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qtrigdoppler-panel .selection-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qtrigdoppler-panel .control-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
}

.qtrigdoppler-panel .control-button {
    padding: 8px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    min-width: 80px;
}

.qtrigdoppler-panel .control-button:hover {
    background-color: #1976D2;
}

.qtrigdoppler-panel .control-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.qtrigdoppler-panel .refresh-button {
    padding: 8px;
    min-width: 36px;
    flex: 0 0 auto;
}

.qtrigdoppler-panel .freq-info {
    margin: 10px 0;
}

.qtrigdoppler-panel .info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0;
}

.qtrigdoppler-panel .info-table td {
    padding: 8px;
    border: 1px solid #e0e0e0;
}

.qtrigdoppler-panel .info-table td:first-child {
    font-weight: bold;
    width: 30%;
}

.qtrigdoppler-panel .freq-value {
    font-family: 'Courier New', monospace;
    margin-right: 8px;
}

.qtrigdoppler-panel .mode-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    min-width: 30px;
    text-align: center;
    color: white;
}

.qtrigdoppler-panel .mode-badge-rx {
    background-color: #2196F3;
}

.qtrigdoppler-panel .mode-badge-tx {
    background-color: #4CAF50;
}

.qtrigdoppler-panel .radio-settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qtrigdoppler-panel .rx-offset-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qtrigdoppler-panel .rx-offset-controls input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 120px;
}

.qtrigdoppler-panel .rx-offset-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.qtrigdoppler-panel .rx-offset-buttons button {
    padding: 6px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
}

/* Custom loading indicator for select elements */
.select-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.select-loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #666;
    font-size: 11px;
    font-style: italic;
}

.qtrigdoppler-panel .radio-settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qtrigdoppler-panel .radio-settings-group label {
    margin-bottom: 4px;
    font-weight: 500;
}

.qtrigdoppler-panel .radio-settings-group select,
.qtrigdoppler-panel .radio-settings-group input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    width: 100%;
    margin-bottom: 8px;
}

.qtrigdoppler-panel .radio-settings-group .control-button {
    margin-bottom: 12px;
}

.qtrigdoppler-panel.minimized {
    height: auto;
}
.qtrigdoppler-panel.minimized .qtrigdoppler-panel-content {
    display: none;
}
.qtrigdoppler-panel.minimized .minimize-button {
    transform: rotate(180deg);
}

/* Settings Section Card Styles (generic for all tabs) */
.settings-section-card {
    background: #fafbfc;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    padding: 18px 20px 12px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(44,62,80,0.04);
}
.settings-section-card h3, .settings-section-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
}
.small-muted {
    color: #888;
    font-size: 0.92em;
    margin-top: 2px;
}
/* Alias for backward compatibility */
.radio-section-card { @extend .settings-section-card; }

.settings-section-card + hr,
.radio-settings hr {
    border: none;
    border-top: 1px solid #e0e4ea;
    margin: 0 0 18px 0;
    background: none;
    height: 1px;
}

.qtrigdoppler-panel .configure-server {
    background: #2c3e50;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-left: 8px;
    transition: background 0.2s;
    box-shadow: none;
}
.qtrigdoppler-panel .configure-server:hover {
    background: #39506a;
}

.qtrigdoppler-panel .selection-group-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qtrigdoppler-panel .selection-group-container .control-select {
    flex: 1 1 auto;
}
.qtrigdoppler-panel .selection-group-container .refresh-button {
    height: 100%;
    min-height: 40px;
    align-self: stretch;
    aspect-ratio: 1 / 1;
}
.qtrigdoppler-panel .selection-group-container .control-select {
    min-height: 40px;
}

#qtrigdoppler-status-message {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #f5f7fa;
    border: 1px solid #e0e4ea;
    color: #2c3e50;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(44,62,80,0.04);
    min-height: 24px;
    transition: background 0.2s, color 0.2s;
}
#qtrigdoppler-status-message.success {
    background: #e8f5e9;
    border-color: #b2dfdb;
    color: #256029;
}
#qtrigdoppler-status-message.error {
    background: #ffebee;
    border-color: #ffcdd2;
    color: #b71c1c;
}
#qtrigdoppler-status-message.info {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
}