/* ================================================== */
/*                  SCAF Dataset CSS                 */
/*      Organized for clarity and maintainability    */
/* ================================================== */


/* --------------- CSS VARIABLES / THEME --------------- */
:root {
  /* Colors */
  --bg: #ffffff;          /* page background */
  --text: #111827;        /* main text color */
  --muted: #6b7280;       /* secondary text / muted */
  --blue: #005197;        /* primary headers & hyperlinks */
  --green: #006630;       /* highlights / selection */
  --red: #9a3a06;         /* danger / accents */
  --card-bg: #ffffff;     /* card background */
  --card-border: #e6eef8; /* card border */
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  --radius: 10px;         /* default border radius */
  --max-width: 900px;     /* content max width */
  --font-stack: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------- FONT IMPORT --------------- */
/* Noto Sans for main font */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700;900&display=swap');


/* --------------- GLOBAL STYLES --------------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: var(--font-stack); background-color: var(--bg); color: var(--text); }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }

::selection { background: var(--green); color: white; }

.hidden { display: none !important; }

kbd {
  display: inline-block;
  padding: 0.08rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: #fff;
  font-family: var(--font-stack);
}

button:focus, input:focus, a:focus {
  outline: 3px solid rgba(0,81,151,0.12);
  outline-offset: 2px;
}

/* --------------- TYPOGRAPHY --------------- */
h1, h2, h3, h4, h5, h6 { margin: 0; }
h1 { color: var(--blue); font-weight: 700; font-size: 3em; margin-bottom: 0em; }
p { margin: 0.75em 0; line-height: 1.5; }

/* --------------- LAYOUT / CONTAINERS --------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.center-box {
  text-align: center;
  background-color: var(--bg);
  border: 2px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 2em 3em;
  width: 70%;
  min-width: 40em;  /* for mobile */
}

@media (max-width: 800px) {
  /* Make the main box fit smaller screens */
  .center-box {
    width: 95%;
    min-width: unset;       /* remove the fixed minimum width */
    padding: 1em 1em;       /* smaller padding for mobile */
  }

  /* Reduce the title size */
  h1 {
    font-size: 1.5em;       /* still readable but much smaller */
    margin-bottom: 0.5em;   /* tighter spacing */
  }

  /* Optional: make sure logo scales nicely */
  .logo {
    width: 80%;
    height: auto;
  }
}


.centered-viewport {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

/* Only center content for homepage */
body.home {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* start instead of center */
  min-height: 100vh;
  overflow-y: auto; /* allow vertical scrolling */
  padding-top: 5vh; /* visually centre on taller screens */
}


.center-content { /* For search/results page */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--bg);
  color: var(--text);
}

/* --------------- HEADER / BRANDING --------------- */
.site-header {
  padding: 1.25rem 1rem;
  text-align: center;
  border-bottom: 1px solid #f2f6fb;
  background: linear-gradient(180deg, rgba(0,0,0,0.01), transparent);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.logo {
  width: 70%;
  max-width: none;
  height: auto;
  display: block;
  margin: 0 auto 1em;
}

.site-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  color: var(--blue);
  letter-spacing: -0.01em;
}

.site-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links {
  /*margin-top: 0.8rem;*/
  /*display: inline-flex;*/
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1em;
}

.nav-links a {
  color: var(--blue);
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
}

.nav-links a:hover, .nav-links a:focus { text-decoration: underline; }

/* --------------- SEARCH / INPUTS / BUTTONS --------------- */
.search-area {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
  flex-wrap: wrap;
}

input[type="text"].search-input,
input[type="text"] {
  width: min(68ch, 70%);
  padding: 0.72rem 0.85rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  outline: none;
  box-shadow: 0 2px 6px rgba(15,23,42,0.04);
}

input[type="text"].search-input:focus {
  box-shadow: 0 0 0 4px rgba(0,81,151,0.08);
  border-color: var(--blue);
}

input[type="date"] {
  text-align: center;
  font-size: 1.5em;
}

button.btn,
button {
  padding: 0.6rem 1.2em;
  font-size: 1rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow);
}

button.search-button {
  background-color: #006630;
  color: white;
}

button.btn-primary { background: var(--blue); color: #fff; }
button.btn-highlight { background: var(--green); color: #fff; }
button.btn-danger { background: var(--red); color: #fff; }

button.btn-primary:hover { filter: brightness(0.95); }
button.btn-highlight:hover { filter: brightness(0.98); }
button.btn-danger:hover { filter: brightness(0.95); }
button:hover { background-color: #003d73; }

/* --------------- CARDS / DATASET ITEMS --------------- */
.dataset-list, .search-results-list { list-style: none; padding: 0; margin: 0; }

.dataset-item, .search-card {
  display: block;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem 0;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  text-align: left;
}

.search-card h2 {
  margin-top: 0em;
}

.dataset-item:hover, .search-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15,23,42,0.08);
}

.dataset-item a, .search-card h2 a {
  color: var(--blue);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.dataset-item a:hover, .search-card h2 a:hover { text-decoration: underline; }

.dataset-meta, .search-card .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.dataset-snippet, .search-card .snippet {
  color: var(--text);
  margin-top: 0.45rem;
  line-height: 1.45;
}

.search-card {
  border-left: 6px solid var(--blue);
  padding: 1.2em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* tags / keywords */
.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(0,102,48,0.08);
  color: var(--green);
  margin-right: 0.35rem;
  border: 1px solid rgba(0,102,48,0.1);
}

p.result-footer {
  color: #006630;
  font-size: 0.9em;
}


/* --------------- ABOUT PAGE --------------- */
.about .profile {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem;
  text-align: center;
  color: var(--text);
}
.about .small-muted {
  color: var(--muted);
  margin-top: 0.6rem;
}

/* --------------- FOOTER --------------- */
footer, footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --------------- HORIZONTAL RULE / LINKS --------------- */
hr, hr.styled {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,81,151,0.06), rgba(0,0,0,0.04));
  margin: 1.5rem auto;
  width: 60%;
}

/* --------------- RESPONSIVE --------------- */
@media (max-width: 640px) {
  .site-brand { gap: 0.6rem; }
  .search-input { width: calc(100% - 3rem); }
  .nav-links { flex-wrap: wrap; gap: 0.5rem; }
}

.centered-body {
  display: flex;
  justify-content: center;   /* horizontal centering */
  align-items: center;       /* vertical centering */
  min-height: 100vh;         /* full viewport height */
  text-align: center;        /* center text inside */
  padding: 1rem;             /* optional padding */
  box-sizing: border-box;
}




.dataset_categories,
.dataset_research_fields {
  margin-left: 1em;
  margin-bottom: 0.8em;
}

.dataset_copyright,
.dataset_usage,
.dataset_acknowledgements {
  font-size: 0.95em;
  color: #444;
  margin-top: 0.5em;
}

.dataset_usage strong,
.dataset_acknowledgements strong {
  color: #005197;
}

h2 {
  margin-top: 1.4em;
  color: #003d73;
}

/* Make select boxes bigger and add spacing */
.filter select,
.filter input[type="text"] {
  font-size: 1.1rem; /* slightly bigger text */
  padding: 0.5em;    /* space inside the box */
  margin-top: 0.3em; /* gap from the label above */
  width: 100%;       /* full width */
  box-sizing: border-box;
}

/* Style the selected tags div */
.filter div[id$="-selection"] {
  margin-top: 0.2em;
  display: flex;
  flex-wrap: wrap;
}

/* Style each selected tag button */
.filter div[id$="-selection"] .selected-tag {
  background-color: #0077cc;
  color: white;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}

.filter div[id$="-selection"] .selected-tag:hover {
  background-color: #005fa3;
}


/* Make text in the last row bigger */
.filter[data-filter="collection-start"],
.filter[data-filter="collection-end"] {
    font-size: 1em;
}

.filter[data-filter="collection-start"] label,
.filter[data-filter="collection-start"] select,
.filter[data-filter="collection-start"] input,
.filter[data-filter="collection-end"] label,
.filter[data-filter="collection-end"] select,
.filter[data-filter="collection-end"] input {
    font-size: 1em;
}

.filter label {
    font-weight: bold;
    font-size: 1.1em; /* adjust size as needed */
}

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0em 1em;
  margin-top: 1em;
}

/* On mobile, switch to a single column */
@media (max-width: 800px) {
  .two-column-grid {
    grid-template-columns: 1fr; /* one column */
    gap: 1em 0;                 /* vertical spacing */
  }
}

.keyword-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  width: 75%;
  margin: 1.5em auto;
}

.keyword-input label {
  font-weight: bold;
  white-space: nowrap;
}

.keyword-input input {
  flex: 1;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Responsive behaviour: stack vertically on small screens */
@media (max-width: 800px) {
  .keyword-input {
    flex-direction: column; /* stack label above input */
    width: 95%;
    align-items: stretch;   /* make input fill the width */
  }

  .keyword-input label {
    white-space: normal;    /* allow wrapping if needed */
    text-align: left;
  }
}


button.selected-filter {
  margin: 0.2em;
  padding: 0.25em 0.5em;
  border-radius: 8px;
  border: 1px solid #005197;
  background: #e0f0ff;
  cursor: pointer;
  font-size: 0.9em;
}

.inline_catbadge {
  padding: 0.2em 0.6em;
  border-radius: 6px;
  font-size: 0.65em;
  font-weight: bold;
  vertical-align: middle;
  display: inline-block;
}

/* Different colours depending on the badgeType */
.inline_catbadge[data-badge-type="public"] {
  margin-left: 0.5em;
  background-color: #c6f5c6;
  color: #085a08;
}

.inline_catbadge[data-badge-type="request"] {
  background-color: #ffe0b3;
  color: #8a4b00;
}

.inline_catbadge[data-badge-type="collaboration"] {
  background-color: #ffa3fb;
  color: #7e247b;
}


#openForCollaboration {
    width: 1.2em;      /* Adjust width as needed */
    height: 1.2em;     /* Adjust height as needed */
    transform: scale(1.2); /* Scale up the checkbox */
    border-radius: 4px; /* Optional, for rounded corners */
}


