/* Controls Section */
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.controls label {
    font-size: 0.9rem;
    color: #e0e0e0; /* Light label text */
}

.controls input,
.controls select {
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #1f1f1f;
    color: #ffffff; /* Light input text */
}

/* Dashboard Container */
#dashboard {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 1028px;
}

/* Station Card */
.station {
    padding: 20px 5px 20px 5px;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Chart Container */
.chart-container {
    height: 400px;
    position: relative;
    width: 100%;
    margin: 0 auto;
    background-color: #202020; /* Chart container background */
    border-radius: 8px;
}

@media (max-width: 768px) {
    .chart-container {
        width: 100%;
    }

    .recent-observations-container h3 {
        font-size: 14px; /* Slightly smaller heading */
    }

    .recent-observations-container th,
    .recent-observations-container td {
        font-size: 0.8rem !important; /* Smaller table font size */
        padding: 11px 6px !important; /* Adjust padding */
    }

    .recent-observations-container table {
        border-spacing: 2px; /* Tighter layout with spacing */
    }

    .mobile-ght-container {
        display: block !important; /* Ensure visibility */
        margin-bottom: 10px; /* Add spacing */
        order: -1;
    }

    .kalshi-header .ght {
        display: none !important; /* Hide desktop GHT on mobile */
    }

    .station-flex {
        flex-direction: column !important; /* Stack all child elements vertically */
    }

    .station-flex > .mobile-ght-container {
        order: -1; /* Place this section at the top */
    }

}


.kalshi-section {
    padding: 15px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Subtle shadow for elevation */
}

.kalshi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.kalshi-header h3 {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.ght {
    font-size: 14px;
    font-weight: bold;
    color: #ff9800; /* Orange GHT text */
    background-color: rgba(255, 152, 0, 0.2); /* Light orange background */
    padding: 6px 12px;
    border-radius: 6px;
}

.kalshi-tickers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kalshi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #2a2a2a;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.kalshi-strike {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.kalshi-status {
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.kalshi-status.yes {
    background-color: rgba(76, 175, 80, 1); /* Light green */
    color: #000;
}

.kalshi-status.no {
    background-color: rgba(244, 67, 54, 1); /* Light red */
    color: #000;
}

.kalshi-status.tbd {
    background-color: rgba(255, 255, 255, 1); /* White for accessibility */
    color: #000;
}

/* Tooltip Styling */
.tooltip {
    background-color: #2e2e2e;
    color: #ffffff;
    border: 1px solid #444;
}

/* Section Titles */
.station h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .chart-container {
        height: 450px;
        min-height: 450px;
    }
    .recent-observations-container {
        margin-right: 10px; /* Gap between Kalshi section */
    }
}

@media (min-width: 769px) {
    .mobile-ght-container {
        display: none !important; /* Hide on desktop */
    }

    .kalshi-header .ght {
        display: inline-block !important; /* Ensure visible on desktop */
    }
}

@media (min-width: 1200px) {
    .chart-container {
        height: 500px;
        min-height: 450px;
    }
}

.hidden {
  display: none;
}

.legend-info {
  margin-top: 10px;
  background: #121212; /* Match chart background */
  color: #e0e0e0;
  padding: 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-info ul {
  list-style-type: none;
  padding: 0;
}

.legend-info li {
  margin-bottom: 5px;
}

.toggle-info {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.toggle-info:hover {
  background-color: #0056b3;
}

/* Recent Observations Section */
.recent-observations-container {
    background-color: #1a1a1a; /* Dark background for the section */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Subtle shadow for elevation */
    padding: 15px;
    flex: 1; /* Allow space distribution with Kalshi */
    color: #e0e0e0;
}

.recent-observations-container h3 {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #444; /* Separator for clarity */
    padding-bottom: 5px;
}

.recent-observations-container table {
    width: 100%;
    border-collapse: collapse;
}

.recent-observations-container th,
.recent-observations-container td {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.recent-observations-container th {
    background-color: #202020;
    color: #ffffff;
    border-bottom: 2px solid #444;
}

.recent-observations-container td {
    color: #e0e0e0;
    background-color: #1f1f1f;
    border-bottom: 1px solid #444;
}

/* Highlight for new rows */
.recent-observations-container tr.new-row {
    animation: fadeInHighlight 1.5s ease-out;
    background-color: rgba(76, 175, 80, 0.2); /* Greenish background for new rows */
}

.new-observation {
    background-color: #ff9800; /* Highlight color */
    animation: fadeInHighlight 2s ease-out, fadeOutHighlight 2s ease-in 2s forwards;
}

.station-flex {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    justify-content: space-between;
}

.station-flex > div {
    flex: 1; /* Distribute space equally between the two sections */
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically */
}

.station-flex > .mobile-ght-container {
    display: none; /* Hide mobile GHT container on desktop */
}

@keyframes fadeInHighlight {
    0% {
        background-color: #ff9800; /* Initial highlight color */
    }
    50% {
        background-color: rgba(255, 152, 0, 0.5); /* Intermediate lighter color */
    }
    100% {
        background-color: transparent; /* End with a smooth transition */
    }
}

@keyframes fadeOutHighlight {
    0% {
        opacity: 1; /* Fully visible */
    }
    100% {
        opacity: 0; /* Fade out */
    }
}

