/* Version 21 - with merged header/nav improvements */

:root {
    --unlocoder-lapis-lazuli: #1F5A90;
    --unlocoder-columbia-blue: #B7CCDA;
    --unlocoder-celestial-blue: #20A1DB;
    --unlocoder-uranian-blue: #AED9F1;
    --unlocoder-polynesian-blue: #015097;
    --unlocoder-sandstone: #D2B48C;
    --main-bg-color: var(--unlocoder-lapis-lazuli);
    --banner-bg-color: var(--unlocoder-columbia-blue);
    --button-bg-color: var(--unlocoder-celestial-blue);
    --button-text-color: #fff;
    --text-color: #fff;
    --table-border-color: var(--unlocoder-polynesian-blue);
    --link-color: var(--unlocoder-celestial-blue);
    --hover-color: var(--unlocoder-uranian-blue);
}

body {
    background-color: var(--main-bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    padding: 1rem;
    background-color: var(--banner-bg-color);
    color: white;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* Center content inside the header */
header .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 80%; /* Prevent header content from stretching too wide */
    margin: 0 auto;
}

/* Wrapper for header content to prevent excessive left/right stretching */
header div {
    max-width: 80%; /* Adjust the width as needed */
    margin: 0 auto; /* Center-align the inner div */
}


header h1 {
    font-size: 2.5em;
    margin: 0;
}

header p {
    font-size: 1em;
    margin: 5px 0 0;
}

header img {
    height: 120px; /* Adjust as needed */
    margin-right: 15px; /* Add space between logo and text */
}

/* Buttons */
button {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 auto; /* Center the button inside the cell */
    display: block; /* Make the button respect the centering */
    transition: background-color 0.3s ease;
}

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

.search-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-buttons button {
  width: 140px;
  font-weight: bold;
  font-size: 1rem;
}

.search-section {
  background: var(--unlocoder-uranian-blue);
  padding: 20px;
  color: #003366;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.search-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.search-buttons button {
  padding: 8px 16px;
  background-color: #005fa3;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.api-buttons-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.api-button {
    background: linear-gradient(135deg, #6ea9db, #4c8acb);
    color: #ffffff;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 0 5px #fff3;
    transition: all 0.2s ease-in-out;
}

.api-button:hover {
    background: linear-gradient(135deg, #4c8acb, #346aa3);
    transform: translateY(-2px);
    box-shadow: 0 0 12px #20A1DB;
}

.data-sources-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-sources-table th, .data-sources-table td {
    border: 1px solid #B7CCDA;
    padding: 0.75rem;
    text-align: left;
}

.data-sources-table th {
    background-color: #1F5A90;
    color: white;
}

.data-sources-table tr:nth-child(even) {
    background-color: #D2EAF1;
}

.form-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.form-label {
    font-size: 14px;
    font-weight: bold;
    color: #1F5A90; /* lapis-lazuli */
    margin-bottom: 5px;
}

.form-select,
.form-input {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 180px;
  box-sizing: border-box;
}

.form-row {
    margin-bottom: 1rem; /* Space between rows */
}

/* JSON Prettiness */
.json-pretty {
    background-color: #f4f8fb; /* Light blue-gray background */
    color: #214074; /* Dark blue text */
    font-family: monospace;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
}

.json-container {
    background-color: #214074; /* unlocoder-lapis-lazuli background */
    /* color: #ffffff; /* White text for readability */ */
    color: #E6DE64; /* unlocoder-highlight-yellow */
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 1rem;
    line-height: 1.5;
    overflow: auto;
    /*
     * white-space: pre-wrap;
     * word-wrap: break-word;
     */
}

.json-container .json-key {
    color: #20A1DB; /* Bright blue for string values */
    font-weight: normal;
}

.json-container .json-value {
    color: #FFD700; /* Gold for values */
    font-weight: bold;
}

.json-container .json-string {
    color: #20A1DB; /* Bright blue for string values */
    font-style: normal;
}

.json-container .json-number {
    color: #FF4500; /* OrangeRed for numbers */
    font-weight: bold;
}

.json-container .json-boolean {
    color: #489A5B; /* Green for booleans */
    font-style: italic;
}

.json-container .json-null {
    color: #FF6347; /* Tomato red for null */
    font-style: italic;
}

.json-container .json-symbol {
    color: #B7CCDA; /* Subtle blue for symbols like braces and commas */
    font-weight: bold;
}

main {
    padding: 2rem; /* Adds consistent padding to all pages */
}

.nav-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    text-align: center; /* Center align the buttons */
    margin-top: 20px; /* Add some spacing between the header and buttons */
    margin-bottom: 20px; /* Add spacing below the buttons */
}

.nav-buttons-row button {
    margin: 0 10px; /* Add spacing between buttons */
    padding: 10px 15px; /* Increase button size */
    font-size: 14px; /* Adjust button text size */
    border: 1px solid #1F5A90; /* Border matching the color scheme */
    background-color: #AED9F1; /* Background color matching the palette */
    color: #1F5A90; /* Text color */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
}

.nav-buttons-row button:hover {
    background-color: #20A1DB; /* Darker blue on hover */
    color: #fff; /* White text on hover */
}

/* Style for navigation buttons section */
.nav-buttons {
    display: flex;
    justify-content: center; /* Center the buttons horizontally */
    gap: 20px; /* Space between the buttons */
    margin-top: 15px; /* Space above the buttons */
    margin-bottom: 20px; /* Space below the buttons */
    background-color: #B7CCDA; /* Light blue background to match the theme */
    padding: 20px; /* Padding for better spacing around buttons */
    border-radius: 50px 10; /* Optional: rounded corners for the button container */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for elevation */
}

/* Style for buttons */
.nav-buttons button {
    font-size: 16px;
    padding: 10px 20px; /* Better padding for button size */
    background-color: #1F5A90; /* Match button background to theme */
    color: white;
    border: none;
    border-radius: 50px 15;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transitions */
}

.nav-buttons button:hover {
    background-color: #AED9F1; /* Lighter blue for hover effect */
    color: #1F5A90; /* Switch text to dark blue for contrast */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow on hover */
}

.nav-link, .api-button {
    color: #fff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid #fff;
    border-radius: 5px;
    background-color: #0055a5;
    transition: background-color 0.3s;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-link:hover, .api-button:hover {
    background-color: #007acc;
}

.no-results-message {
  color: #b33c3c;
  text-align: center;
  font-weight: bold;
  margin-top: 1rem;
  font-size: 1rem;
}

/* Loading spinner animation */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1F5A90;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.search-label {
  font-weight: bold;
  color: #003366;
  font-size: 1rem;
  margin-right: 0.5rem;
}
}

.results-box,
.search-results {
  animation: fadeIn 0.7s ease-in;
  background: #f8f8f8;
  border-collapse: collapse;
  border-radius: 6px;
  font-family: monospace;
  margin-top: 2rem;
  padding: 15px;
  width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.search-results th, .search-results td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
}

.search-results th {
    background-color: #B7CCDA; /* Columbia Blue */
    color: #1F5A90; /* Lapis Lazuli */
}

.search-results tr:nth-child(even) {
    background-color: #F0F8FF; /* Light shade for alternating rows */
}

.search-results tr:hover {
    background-color: #D2EAF1; /* Highlighted row */
}

.search-results td a:link,
.search-results td a:visited,
.search-results td a:active {
    color: #FF69B4;  /* hot pink */
    text-decoration: none;
    text-shadow: 0 0 6px #FFD700, 0 0 10px #FFD700;
}

.search-results td a:hover {
    color: #FFD700;  /* gold text */
    text-decoration: none;
    text-shadow: 0 0 6px #FFD700, 0 0 10px #FFD700;
}

/* Tables */

/* Search Results Table */

table.search-results {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table.search-results th {
    background-color: #B7CCDA; /* unlocoder-columbia-blue */
    color: #1F5A90; /* unlocoder-lapis-lazuli */
    padding: 10px;
    text-align: left;
}

table.search-results td {
    background-color: #AED9F1; /* unlocoder-uranian-blue */
    color: #015097; /* unlocoder-polynesian-blue */
    padding: 10px;
    text-align: left;
}

table.search-results tr:nth-child(even) td {
    background-color: #D2B48C; /* unlocoder-tan */
}

table.search-results tr:hover td {
    background-color: #20A1DB; /* unlocoder-celestial-blue */
    color: #ffffff;
}

.section-title {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: bold;
  color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: center; /* Center text and elements in the cells */
}

th, td {
    border: 1px solid var(--table-border-color);
    padding: 20px;
    text-align: center;
    vertical-align: middle; /* Vertically center elements */
}

th {
    background-color: var(--unlocoder-polynesian-blue);
    color: var(--text-color);
}

td {
    background-color: var(--unlocoder-uranian-blue);
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--hover-color);
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: left;
    margin-bottom: 1rem;
}

.header-links {
  padding: 0.5rem 1rem 1rem;
  background-color: var(--banner-bg-color);
  box-sizing: border-box;
  justify-content: center;
  gap: 1rem;
}

.header-links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.header-logo {
  height: 120px;
}

.logo {
    height: 120px;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.header-text {
    text-align: left;
}

.header-text h2 {
    margin: 0;
    font-size: 2em;
    color: var(--unlocoder-polynesian-blue);
}

.header-text p {
    margin: 0;
    font-size: 1rem;
    color: var(--unlocoder-polynesian-blue);
}

.header-title-text {
  text-align: left;
}

.header-title h1 {
  margin: 0;
  font-size: 1.8rem;
  animation: floatTitle 3s ease-in-out infinite;
}

@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.header-title-text h2 {
  margin: 0;
  font-size: 2rem;
  color: var(--unlocoder-polynesian-blue);
}

.header-title-text p {
  margin: 0;
  font-size: 2rem;
  color: var(--unlocoder-polynesian-blue);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-row {
    flex-direction: column;
    text-align: center;
  }

  .header-links {
    gap: 0.5rem;
  }

  .header-links-row {
    flex-direction: column;
  }
}

.section-title {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: bold;
  color: white;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.search-label {
  font-weight: bold;
  color: #003366;
  font-size: 1rem;
  margin-right: 0.5rem;
}

.form-select,
.form-input {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 180px;
  box-sizing: border-box;
}

.search-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-buttons button {
  width: 140px;
  font-weight: bold;
  font-size: 1rem;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1F5A90;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-results-message {
  color: #b33c3c;
  text-align: center;
  font-weight: bold;
  margin-top: 1rem;
  font-size: 1rem;
}

.status-box {
  background-color: #f0f8ff;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-top: 1rem;
  color: #003366;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.status-table th {
  background-color: #1F5A90;
  color: white;
  padding: 0.5rem;
  text-align: left;
}

.status-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #ccc;
}

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

.status-timer {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #1F5A90;
  text-align: right;
}

.refresh-spinner {
  margin: 1rem auto;
  width: 28px;
  height: 28px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #1F5A90;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
