/* General page styling */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #1B2947; /* Dark blue background */
    color: #FFFFFF; /* White text for main content */
}

h1, h2, h3, h4 {
    color: goldenrod; /* Goldenrod headings */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

/* Specific styling for section headings to match system_search_styles.css */
.section-heading {
    color: goldenrod;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.centered-heading {
    text-align: center;
}

a {
    color: #036; /* Dark blue links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #ffcc00; /* Goldenrod on hover */
}

/* Container for System Details (Astrometry, Photometry) */
.system-details-container {
    background-color: #868db0; /* Medium blue/gray background */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333; /* Darker text for readability on lighter background */
    margin-bottom: 1.5em;
    padding: 0.5em; /* Padding for the entire block */
}

/* Astrometry Grid (inside system-details-container) */
.astrometry-grid {
    display: grid;
    grid-template-columns: max-content minmax(10em, 1fr) max-content minmax(10em, 8fr);
    row-gap: 0.5em;
    column-gap: 1.5em;
    padding: 0.5em 0; /* Adjust padding as needed, or remove if parent padding is enough */
}

/* General grid styling for photometric/spectral and orbital parameters to match astrometry */
.photometric-spectral-container,
.orbital-parameters-grid {
    background-color: #868db0; /* Medium blue/gray background */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
    padding: 0.5em; /* Consistent padding */
    margin-bottom: 1.5em; /* Spacing between sections */
}

.photometric-spectral-container {
    display: grid;
    grid-template-columns: max-content max-content; /* Two main columns */
    column-gap: 4em;
    row-gap: 0.4em;
}

.component-properties-grid {
    display: grid;
    grid-template-columns: auto auto; /* Two columns for properties (e.g., "Magnitude: value") */
    column-gap: 1em;
    row-gap: 0.4em;
}

.orbital-parameters-grid {
    display: grid;
    grid-template-columns: auto auto auto auto; /* Four columns for parameters */
    column-gap: 2em;
    row-gap: 0.4em;
}

/* For elements that span multiple columns in a grid */
.colspan-3 {
    grid-column: span 3;
}
.colspan-4 {
    grid-column: span 4;
    word-wrap:break-word;
    overflow-wrap:break-word;
    white-space: normal;
}

/* Unit styling */
.unit {
    color: #666; /* Light gray for units */
}

/* Derived Quantities styling */
.derived-quantities-section {
    background-color: #868db0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
    padding: 0.5em 1em; /* Adjusted padding */
    margin-bottom: 1.5em;
}

.derived-quantities-list {
    list-style-type: disc; /* Bullet points */
    padding-left: 1.5em; /* Indent list items */
    margin: 0;
}

.derived-quantities-list li {
    margin-bottom: 0.3em;
}

/* Graphs Section */
.graph-row {
    display: flex; /* Arrange graphs side-by-side */
    justify-content: center; /* Center the graphs */
    flex-wrap: wrap; /* Allow graphs to wrap on smaller screens */
    gap: 2em; /* Space between graphs */
    margin-bottom: 2em;
}

.graph-container {
    text-align: center;
    background-color: #fff; /* White background for graph container */
    padding: 1em;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
}

.rv-graph {
    max-width: 100%; /* Ensure images are responsive */
    height: auto;
    display: block; /* Remove extra space below image */
    margin: 0 auto; /* Center image */
}

/* Download Button */
.button-container {
    text-align: center;
    margin: 1.5rem 0;
}

.button {
    display: inline-block;
    padding: 0.7em 1.5em;
    background-color: #ffcc00; /* Goldenrod button */
    color: black;
    border: 2px solid #e6b800;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none; /* Remove underline for buttons */
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #e6b800; /* Darker goldenrod on hover */
}

/* Radial Velocity Data Table */
.data-table-container {
    background-color: #fff; /* White background for table */
    padding: 1em;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
    margin-bottom: 1.5em;
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
}

.data-table {
    border-collapse: collapse;
    width: 100%; /* Make table fill container */
    font-size: 0.95em;
}

.data-table thead tr {
    background-color: #e0e4f0; /* Light blue/gray for header */
}

.data-table th,
.data-table td {
    padding: 8px 12px; /* Consistent padding */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5; /* Light hover effect */
}

/* Back Link */
.back-link-container {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem; /* Add some space at the bottom of the page */
}

.back-link {
    color: #036;
    font-weight: bold;
}
.back-link:hover {
    color: #ffcc00;
}
