/*
   GUCDS archive theme, matching the GUCDS web site (gucds.inaf.it, WordPress/Avada): white chrome with the red logo,
   Nunito text, bold Roboto Mono headings, the site's crimson (#c20037) for the active and primary items, its link blue
   (#204d74), a pale grey title strip, a dark footer, flat square shapes and hairline dividers. Loaded after gucds.css
   and the page styles; it only restyles, no markup, ids or scripts change.
*/
/* The two fonts, served from fonts/ (SIL Open Font License; variable fonts covering weights 400-700, latin subset) */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/Nunito-latin-variable.woff2") format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/RobotoMono-latin-variable.woff2") format("woff2"); }

:root {
  --crimson: #c20037;    /* the site's active menu item */
  --crimson-2: #a3002e;
  --link: #204d74;       /* the site's links */
  --ink: #3a3a3a;        /* the site's text */
  --head: #333333;       /* the site's headings */
  --strip: #f5f5f5;      /* the site's page-title strip */
  --rule: #e0e0e0;       /* the site's menu dividers */
  --foot: #282a2b;       /* the site's footer */
  --select: #fbe6ec;     /* a light tint of the crimson, for the selected row */
  --ui: "Nunito", "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, Menlo, monospace;
}

body {
  font-family: var(--ui);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  font-variant-numeric: tabular-nums;
}
a, a:link, a:visited { color: var(--link); }
a:hover { color: var(--crimson); }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }

/* Header: white, the logo as on the site, the page name in bold Roboto Mono, and a grey title strip below */
.hdrdiv, .hdrdiv2 {
  background: #fff !important;
  color: var(--head) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule) !important;
  height: 72px;
  box-shadow: 0 1px 0 var(--rule), 0 6px 0 var(--strip);
  margin-bottom: 8px;
}
.hdrdiv2 { height: auto; padding: 4px 0 !important; }
.hdrdiv img[alt="GUCDS"], .hdrdiv2 img[alt="GUCDS"] { height: 64px; margin: 4px 0 0 8px; }
.hdrdiv span[style*="italic"], .hdrdiv2 span[style*="italic"] {
  font-family: var(--mono); font-style: normal !important; font-weight: 700; color: var(--head); font-size: 1.35rem;
}
.hdrdiv span[style*="#ccc"], .hdrdiv2 span[style*="#ccc"] { color: #999 !important; font-family: var(--ui); font-size: 0.85rem; }
.hdrdiv a:not(.al_medbutton) { color: var(--link) !important; font-size: 1rem; }
/* the header links as the site's menu items: plain uppercase, crimson when pointed at */
.hdrdiv .al_medbutton, .hdrdiv a.al_medbutton {
  background: #fff !important;
  color: var(--head) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  text-transform: uppercase;
  font-size: 0.85rem !important;
  letter-spacing: 0.03em;
  padding: 7px 12px !important;
}
.hdrdiv .al_medbutton:hover { background: var(--crimson) !important; color: #fff !important; border-color: var(--crimson) !important; }
.hdrdiv .al_medbutton i { color: inherit; }

/* The archive's pages in the header, as the menu of the GUCDS web site: plain uppercase items, crimson when pointed at,
   the page shown marked with a crimson rule */
.gucds-nav { display: inline-flex; gap: 2px; margin-left: 2rem; vertical-align: middle; }
.gucds-nav a, .gucds-nav a:link, .gucds-nav a:visited {
  font-family: var(--ui); font-size: 0.85rem !important; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--head) !important; padding: 7px 12px; border-bottom: 2px solid transparent; text-decoration: none;
}
.gucds-nav a:hover { background: var(--crimson); color: #fff !important; text-decoration: none; }
.gucds-nav a[aria-current="page"], .gucds-nav a[aria-selected="true"] { border-bottom-color: var(--crimson); font-weight: 700; }

/* Buttons: flat and square, as on the site; the database's primary action in crimson */
.al_medbutton, .al_button, .al_smallbutton, button.al_medbutton, .submit_grey, .submit_grey_small {
  font-family: var(--ui);
  background: #fff;
  color: var(--head);
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  padding: 5px 10px;
  cursor: pointer;
}
.al_medbutton:hover, .al_button:hover, .al_smallbutton:hover { background: var(--strip); border-color: var(--crimson); color: var(--crimson); }
.submit_main {
  font-family: var(--ui);
  background: var(--crimson);
  border: 1px solid var(--crimson);
  border-radius: 2px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 14px;
}
.submit_main:hover { background: var(--crimson-2); }
.submit_main i { margin-right: 6px; }

/* Forms */
#selform1, .input_tab { font-family: var(--ui); }
#selform1 { border-bottom: 1px solid var(--rule); padding: 6px 4px 10px; }
#selform1 .input_tab th, #selform1 th[style] { background: transparent !important; }
#selform1 label { font-weight: 400; margin-right: 10px; }
input[type="text"], input[type="number"], input[type="password"], input[type="date"], textarea, select {
  font-family: var(--ui);
  border: 1px solid #cfcfcf;
  border-radius: 0;
  padding: 4px 6px;
  background: #fff;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--crimson); }
#s_wquery, #s_namelist { font-family: var(--mono) !important; font-size: 0.88rem !important; }

/* WHERE clause builder */
/* the link sits just under the WHERE box without taking any room, so that nothing around it moves; its panel is placed
   by gucds_query.js (fixed, as the search form's box would clip it) */
th:has(> #qb_panel) { position: relative; }
#qb_panel { position: absolute;
      /* left: 0.5rem; top: calc(100% - 0.6rem); */
  font-family: var(--ui); font-weight: 400; text-align: left; white-space: nowrap; z-index: 5; }
#qb_panel summary { cursor: pointer; color: var(--link); font-size: 0.85rem; }
#qb_panel summary:hover { color: var(--crimson); }
#qb_panel .qb_body { position: fixed; z-index: 900; width: min(46rem, 92vw); background: #fff; white-space: normal;
  border: 1px solid var(--rule); border-top: 2px solid var(--crimson); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); padding: 10px 12px; }
#qb_rows { margin: 0 0 6px; }
.qb_row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.qb_row select, .qb_row input[type="text"] { font-size: 0.9rem; }
.qb_col { max-width: 22rem; }
.qb_val, .qb_val2 { width: 9rem; }
.qb_phot { font-size: 0.85rem; color: #555; }
#qb_msg { margin-left: 8px; font-size: 0.9rem; color: #555; }
.qb_br { padding: 2px 8px !important; font-family: var(--mono); color: #999 !important; }
.qb_br[aria-pressed="true"] { color: #fff !important; background: var(--crimson) !important; border-color: var(--crimson) !important; }
.qb_note { margin: 4px 0; font-size: 0.85rem; color: #555; }
#qb_preview { font-family: var(--mono); white-space: normal; }
#qb_preview.qb_bad { color: var(--crimson); }
th.extra_col { color: var(--crimson) !important; }
#add_col { margin-left: 1rem; max-width: 16rem; font-size: 0.9rem; vertical-align: middle; }

/* Results table, styled like the site's TablePress tables: grey head, hairlines, crimson selection */
table.dataTable { border-collapse: collapse !important; }
table.dataTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--strip) !important;
  color: var(--head);
  font-weight: 700;
  border-bottom: 2px solid var(--crimson) !important;
}
table.dataTable thead th a, table.dataTable thead th { color: var(--head) !important; }
table.dataTable tbody td { border-top: 1px solid #ececec; padding: 5px 8px; }
table.dataTable tbody tr:hover td { background: #fafafa; }
table.dataTable tbody tr.selected td { background: var(--select) !important; color: var(--ink); }
table.dataTable tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--crimson); }
#table_log td:nth-child(2) { font-family: var(--mono); font-size: 0.86rem; }
#table_log td:nth-child(2) span, #table_log td:nth-child(2) button { font-family: var(--ui); font-size: 0.85rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--crimson) !important; color: #fff !important; border-color: var(--crimson) !important; }
.simbad_btn { border-radius: 2px; }
.log_qry, #log_qry { font-family: var(--mono); font-size: 0.82rem; color: #777; }

/* Sky viewer label */
#al_objinfo-div { background: var(--foot); color: #eee; padding: 4px 8px; width: 443px;}

/* Object summary: a white panel with the site's title strip */
#objfull_info-div { border: 1px solid var(--rule); border-radius: 0; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); }
#objfull_info-div .sum_head { background: var(--strip); color: var(--head); border-bottom: 2px solid var(--crimson); font-family: var(--mono); font-weight: 700; }
#objfull_info-div .sum_close { color: var(--head); }
#objfull_info-tab th { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: #777; }
#objfull_info-tab td { font-size: 0.86rem; }

/* Spectra browser: the files bar, and the Bokeh controls in the site's colours */
#spe_id { font-family: var(--mono); font-weight: 700; color: var(--head); }
.bk-root .bk-btn-group .bk-btn.bk-active, .bk-btn-group .bk-btn.bk-active { background-color: var(--crimson) !important; border-color: var(--crimson) !important; color: #fff !important; font-weight: 700; }
.bk-root .bk-btn-primary { background-color: var(--foot) !important; border-color: var(--foot) !important; }
.bk-root, .bk-root .bk-input, .bk-root .bk-btn { font-family: var(--ui) !important; }

/* Tutorial, FAQ and help: the site's reading style */
.doc { font-family: var(--ui) !important; color: var(--ink) !important; max-width: 52rem !important; line-height: 1.65 !important; font-size: 16px; }
.doc > p, .doc li { max-width: 48rem; }
.doc h2, .doc h3 { font-family: var(--mono); color: var(--head); font-weight: 700; }
.doc h2 { border-bottom: 2px solid var(--crimson) !important; padding-bottom: 4px; }
.doc code, .doc pre { font-family: var(--mono) !important; background: var(--strip) !important; font-size: 0.86em; }
.doc pre { border-left: 3px solid var(--crimson) !important; }
.doc th { background: var(--strip); color: var(--head); }
.doc figcaption { color: #777; font-size: 0.9rem; }
.toc { background: var(--strip) !important; border-left: 3px solid var(--crimson); }
.toc ol { columns: 2; column-gap: 2.5rem; }
.infoflds-tab th { background: var(--strip) !important; color: var(--head) !important; font-family: var(--ui); }
.infoflds-tab { font-family: var(--ui); }

/* Upload and sign-in */
.upbox { font-family: var(--ui); }
.upbox h3, .container h1, .container h2 { font-family: var(--mono); color: var(--head); }
.upbox table th { background: var(--strip); }
.container { font-family: var(--ui); }

/* The footer at the bottom of the window on short pages (no white space beneath it); long pages scroll as before */
body { min-height: calc(100vh - 10px); display: flex; flex-direction: column; }  /* 10px: the body margin of gucds.css */
body > div.trailer { margin-top: auto; }

/* Footer, as on the site */
div.trailer { background-color: var(--foot) !important; color: #bbb !important; border: 0 !important; font-family: var(--ui); }
div.trailer a { color: #fff !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Sign-in button (login.css), as the site's primary button */
.container .btn-primary, .container .btn-primary:hover {
  background: var(--crimson) !important; background-image: none !important; border: 1px solid var(--crimson) !important;
  border-radius: 2px; color: #fff !important; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700;
}
.container .btn-primary:hover { background: var(--crimson-2) !important; }

/* The sections of the search page shown in place of the search (gucds_tabs.js) */
#tab_doc .doc { max-width: 56rem; margin: 1.5rem auto 3rem; padding: 0 1rem; }
