
/**
 * site.css - stylesheet for the Caltech Library's Digital Library Development Group's sandbox.
 *
 * orange: #FF6E1E;
 *
 * Secondary pallet:
 *
 * lightgrey: #C8C8C8
 * grey: #76777B
 * darkgrey: #616265
 * slategrey: #AAA99F
 *
 * Impact Pallete see: http://identity.caltech.edu/web/colors
 *
 * TODO: Need to make a small screen friendly version
 *
 *
 * ============================================
 * Customization & Theming Notes
 * ============================================
 *
 * This stylesheet uses CSS custom properties (variables)
 * to allow optional theming and customization.
 *
 * Default values are defined in the :root selector below.
 * These defaults will be used automatically if no overrides
 * are provided.
 *
 * To customize styles, create a separate CSS file and define
 * your own :root variables there. Then include that file
 * AFTER this stylesheet in your HTML.
 *
 * Example:
 *
 *   <link rel="stylesheet" href="site.css">
 *   <link rel="stylesheet" href="custom.css">
 *
 * In custom.css:
 *
 *   :root {
 *     --color-primary: #0055cc;
 *     --color-nav-bg: black;
 *   }
 *
 * Only override the variables you need—everything else will
 * fall back to the defaults defined here.
 *
 * This approach allows:
 *   - Zero configuration for most users
 *   - Simple overrides for advanced users
 *   - Safe fallback values if variables are missing
 *
 * Note: CSS applies the "cascade" rule, meaning later files
 * override earlier ones when selectors have equal specificity.
 */

/* ============================================================
 * Color palette — adjust here to retheme the site.
 * Based on the Caltech Library (library.caltech.edu) design.
 * ============================================================ */
:root {
  /* ---- Brand ---- */
  --color-primary:   #FF6E1E;   /* Caltech orange — accent, hover, active */

  /* ---- Greyscale palette ---- */
  --color-lightgrey: #C8C8C8;
  --color-grey:      #76777B;
  --color-darkgrey:  #616265;
  --color-slategrey: #AAA99F;

  /* ---- Page base ---- */
  --color-text:      #1D1D1D;   /* near-black body text */
  --color-bg:        #FFFFFF;   /* page background */
  --color-link:      #1a5096;   /* default hyperlink (library blue) */
  --color-border:    #DDDDDD;   /* general border colour */

  /* ---- Site header navigation (dark bar) ---- */
  --color-site-nav-bg:       #1D1D1D;   /* dark charcoal — matches library.caltech.edu header */
  --color-site-nav-text:     #FFFFFF;
  --color-site-nav-hover:    var(--color-primary);

  /* ---- Browse navigation bar (full-width bar below header) ---- */
  --color-browse-nav-bg:         #F0F0F0;   /* light grey bar */
  --color-browse-nav-text:       #1D1D1D;   /* dark text — visible on light background */
  --color-browse-nav-border:     #CCCCCC;   /* separator between items */
  --color-browse-nav-hover-bg:   var(--color-primary);
  --color-browse-nav-hover-text: #FFFFFF;

  /* ---- Footer ---- */
  --color-footer-bg:   #1D1D1D;
  --color-footer-text: #C8C8C8;

  /* ---- Legacy aliases (keep existing rules working) ---- */
  --color-nav-bg:     var(--color-site-nav-bg);

  /* ---- Typography ---- */
  --font-family-base: "Open Sans", Helvetica, Sans-Serif;
  --font-size-base:   14px;

  /* ---- Misc ---- */
  --color-announcement:    white;
  --color-bg-announcement: var(--color-primary);
}

body {
     margin: 0;
     border: 0;
     padding: 0;
     width: 100%;
     height: 100%;
     color: var(--color-text, black);
     background-color: var(--color-bg, white);
     font-family: var(--font-family-base, Open Sans, Helvetica, Sans-Serif);
     font-size: var(--font-size-base, 14px);
}

header {
     position: relative;
     display: block;
     color: var(--color-bg, white);
     background-color: var(--color-bg, white);
     z-index: 2;
     height: 105px;
     vertical-align: middle;
}

header img {
     position: relative;
     display: inline;
     padding-left: 20px;
     margin: 0;
     height: 42px;
     padding-top: 32px;
}

header h1 {
     position: relative;
     display: inline-block;
     margin: 0;
     border: 0;
     padding: 0;
     font-size: 3em;
     font-weight: normal;
     vertical-align: 0.78em;
     color: var(--color-primary, #FF6E1E);
}

header a, header a:link, header a:visited, header a:active, header a:hover, header a:focus {
    color: var(--color-primary, #FF6E1E);
    background-color: inherit;
}

a, a:link, a:visited {
    color: var(--color-link, #747267);
    background-color: inherit;
    text-decoration: none;
}

a:active, a:hover, a:focus {
  color: var(--color-primary, #FF6E1E);
  font-weight: bolder;
}

/* Scope dark-background nav rules to the site header only.
   The browse-nav sits outside <header> and uses its own colour variables. */
header nav {
     position: relative;
     display: block;
     width: 100%;
     margin: 0;
     padding: 0;
     font-size: 0.78em;
     vertical-align: middle;
     color: var(--color-site-nav-text, white);
     background-color: var(--color-site-nav-bg, #1D1D1D);
     text-align: left;
}

header nav div {
     display: inline-block;
     margin-left: 10em;
     margin-right: 0;
}

header nav a, header nav a:link, header nav a:visited, header nav a:active {
    color: var(--color-site-nav-text, white);
    background-color: inherit;
    text-decoration: none;
}

header nav a:hover, header nav a:focus {
    color: var(--color-site-nav-hover, #FF6E1E);
    background-color: inherit;
    text-decoration: none;
}

nav div h2 {
     position: relative;
     display: block;
     min-width: 20%;
     margin: 0;
     font-size: 1.24em;
     font-style: normal;
}

nav div > ul {
     display: none;
     padding-left: 0.24em;
     text-align: left;
}

nav ul {
     display: inline-block;
     padding-left: 0.24em;
     list-style-type: none;
     text-align: left;
     text-decoration: none;
}

nav ul li {
     display: inline;
     padding: 1em;
}

section {
     position: relative;
     display: inline-block;
     width: auto;
     max-width: 98%;
     height: 100%;
     color: var(--color-text, black);
     background-color: var(--color-bg, white);
     margin: 0;
     padding-top: 2em;
     padding-bottom: 2em;
     padding-left: 1em;
     padding-right: 2em;
}

section > menu {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
}

section > menu > li {
	flex-grow: 1;
}

section h1 {
    font-size: 1.32em;
}

section h2 {
    font-size: 1.12em;
    font-style: italic;
}

section h3 {
    font-size: 1em;
    /* text-transform: uppercase; */
}

section ul {
    list-style-type: disc;
}


section a, section a:link, section a:visited, section a:active {
    font-style: italic;
    font-weight: normal;
    text-decoration: underline;
}

section a:hover, section a:focus {
    color: var(--color-primary, #FF6E1E);
    text-decoration: none;
}

/*
 * We want the links in the output of the Builder widget to pop out
 * as links.
 */
section.widget a, section.widget a:link, section.widget a:visited, section.widget a:active {
    color: var(--color-widget-link, blue);
}

aside {
     margin: 0;
     border: 0;
     padding-left: 1em;
     position: relative;
     display: inline-block;
     text-align: right;
}

aside h2 {
     font-size: 1em;
     text-transform: uppercase;
}

aside h2 > a {
     font-style: normal;
}

aside ul {
     margin: 0;
     padding: 0;
     display: block;
     list-style-type: none;
}

aside ul li {
     font-size: 0.82em;
}

aside ul > ul {
     padding-left: 1em;
     font-size: 0.72em;
}

footer {
     position: fixed;
     bottom: 0;
     display: block;
     width: 100%;
     height: 2em;
     color: var(--color-bg, white);
     background-color: var(--color-footer-bg, #303030);
     font-size: 80%;
     text-align: left;
     vertical-align: middle;
     z-index: 2;
}

footer h1, footer span, footer address {
     position: relative;
     display: inline-block;
     margin: 0;
     padding-left: 0.24em;
     font-family: var(--font-family-base, Open Sans, Helvetica, Sans-Serif);
     font-size: 1m;
}

footer h1 {
     font-weight: normal;
}

footer a, footer a:link, footer a:visited, footer a:active, footer a:focus, footer a:hover {
     padding: 0;
     display: inline;
     margin: 0;
     color: var(--color-primary, #FF6E1E);
     text-decoration: none;
}

/* Form styling */
/*
form {
    display: block;
    padding: 1em;
    border-style: solid;
    border-radius: 0.82em;
    border-width: 0.18em;
    border-color: red;
}
*/

form div label {
    display: inline;
    margin: 0.72em;
    text-align: right;
    min-width: 5em;
}

form div input[type=button] {
    margin: 1em;
    border-radius: 82em;
}

/* Widget is the outer container for either a
 * BuilderWidget or SearchWidger */
.widget {
    display: block;
    flex-flow: row wrap;
    padding: 1em;
    border-style: solid;
    border-radius: 0.82em;
    border-width: 0.18em;
    border-color: var(--border-color, red);
}

.announcement {
    color: var(--color-announcement, white);
    background-color: var(--color-bg-announcement, orange);
    padding: 1em;
    margin-top: 2em;
    margin-bottom: 2em;
    margin-left: 0em;
    margin-right: 0em;
    text-overflow: ellipsis;
    border: 1px solid black;
}

/*
.article-result, .publication-result, .book_section-result {
    margin-bottom: 1.24em;
}
*/


/*
 * Search box and results layout
 */
.search-box {
    display: block;
}

.search-box div {
    display: block;
}

.search-box div label {
    vertical-align: top;
}

.search-go-button {
    display: block;
}

.search-go-button input {
    text-align: center;
    margin: 0.24em;
}

.search-result-pager {
    padding-top: 1.24em;
    padding-bottom: 1.24em;
}

.search-results {
    margin-top:0;
    margin-bottom:0;
    margin-left: 0;
    margin-right: 1.24em;
    padding: 0;
}
.search-result {
    padding-top: 0.24em;
    padding-bottom: 1.24em;
}

.search-result:nth-child(odd) {
    background-color: var(--color-lightgrey, lightgrey);
}

.field-name, .matched-name, .index-name {
    display: inline-block;
    width: 6%;
    margin-right: 1.24em;
    text-transform: lowercase;
    text-align: right;
    vertical-align: top;
}

.field-value, .matched-value, .index-value {
    display: inline-block;
    text-align: left;
    vertical-align: top;
}

.index-name, .index-value {
    font-style: italic;
    font-size: smaller;
}

a.visually-hidden:focus {
    position: static;
    display: block;
    width: 9rem;
    height: 1rem;
    margin: 5px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-text, while);
    border-radius: 4px;
    background-color: var(--color-bg, while);
}

a.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
 * ep3StaticSite additions
 * ============================================================ */

/* Skip link — visible only on keyboard focus */
.skip-link {
    position: absolute;
    top: -2.5rem;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--color-site-nav-bg);
    color: var(--color-site-nav-text);
    z-index: 100;
    border-radius: 0 0 4px 0;
    text-decoration: none;
    transition: top 0.1s;
}
.skip-link:focus { top: 0; }

/* ---- Site branding (inside <header>) ---- */
.site-brand {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-site-nav-bg);
}
.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary) !important;
    text-decoration: none;
}
.site-tagline {
    font-size: 0.85rem;
    color: var(--color-lightgrey);
}

/* ---- Site navigation (dark header bar) ---- */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    background-color: var(--color-site-nav-bg);
    gap: 0;
}
.site-nav > li {
    padding: 0.5rem 1rem;
    display: inline-block;
}
/* ---- Browse navigation bar (full-width, below header) ----
   The <nav class="browse-nav"> sits outside <header> so the
   "header nav a { color: white }" rule above does not apply here.   */
.browse-nav {
    background-color: var(--color-browse-nav-bg);
    border-bottom: 1px solid var(--color-browse-nav-border);
    padding: 0 1rem;
}
.browse-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.browse-nav li { padding: 0; }
.browse-nav a,
.browse-nav a:link,
.browse-nav a:visited {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-browse-nav-text);
    background-color: transparent;
    text-decoration: none;
    font-size: 0.85rem;
    border-right: 1px solid var(--color-browse-nav-border);
}
.browse-nav li:last-child a { border-right: none; }
.browse-nav a:hover,
.browse-nav a:focus {
    background-color: var(--color-browse-nav-hover-bg);
    color: var(--color-browse-nav-hover-text);
}

/* ---- Main content area ---- */
main {
    display: block;
    padding: 1.5rem 2rem;
    max-width: 62rem;
    margin-bottom: 3rem;
}

/* ---- Thesis landing page ---- */
.thesis-record h1 {
    font-size: 1.4rem;
    color: var(--color-text);
    line-height: 1.3;
}
.thesis-record h2 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}
.thesis-record p { line-height: 1.6; }
.thesis-record ul { line-height: 1.8; }

/* Repository metadata aside on landing page */
.record-meta {
    margin-top: 2rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-left: 3px solid var(--color-primary);
    font-size: 0.85rem;
}
.record-meta dl {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
}
.record-meta dt { font-weight: bold; color: var(--color-darkgrey); }

/* ---- Browse list views ---- */
.browse-view h1 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}
.browse-view h2 {
    font-size: 1rem;
    margin-top: 1.5rem;
    color: var(--color-darkgrey);
}
.browse-view ul { padding-left: 1.25rem; line-height: 1.9; }
.browse-view a,
.browse-view a:link,
.browse-view a:visited {
    color: var(--color-link);
    text-decoration: underline;
}
.browse-view a:hover,
.browse-view a:focus {
    color: var(--color-primary);
}

/* ---- Footer ---- */
.footer-inner {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--color-footer-text);
}
.footer-inner a,
.footer-inner a:link,
.footer-inner a:visited {
    color: var(--color-primary);
    text-decoration: none;
}
.footer-inner a:hover,
.footer-inner a:focus {
    text-decoration: underline;
}
.footer-note { margin-top: 0.25rem; font-style: italic; }

