/*
 * Sauce Labs theme, loaded after app.css.
 * Colours and type follow saucelabs.com. Only colours, fonts, borders and the
 * page chrome change here: example widgets keep their sizes and positions,
 * and no markup, id, class or text depends on this file.
 */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url('../fonts/atkinson-hyperlegible-next_f8db614b.woff2') format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url('../fonts/atkinson-hyperlegible-mono_c4f46431.woff2') format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* saucelabs.com uses P22 Mackinac Pro for headings; Fraunces is the closest open font. */
@font-face {
  font-family: "Fraunces";
  src: url('../fonts/fraunces_53495798.woff2') format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sl-pine: #192319;
  --sl-pine-light: rgba(25, 35, 25, 0.64);
  --sl-pine-xlight: rgba(25, 35, 25, 0.24);
  --sl-forest: #043423;
  --sl-moss: #3c483c;
  --sl-ivory: #f0f0ec;
  --sl-off-white: #f8f8f8;
  --sl-warm-gray: #dcdcd7;
  --sl-stone: #c8c8be;
  --sl-highlight: #abe082;
  --sl-light-highlight: #f3ffcc;
  --sl-flare: #f55524;
  --sl-clay-red: #961001;
  --sl-deep-shock: #334bc3;
  --sl-sunflower: #f1be23;
  --sl-sans: "Atkinson Hyperlegible Next", Arial, sans-serif;
  --sl-serif: "Fraunces", "Times New Roman", serif;
  --sl-mono: "Atkinson Hyperlegible Mono", Menlo, monospace;
}

/* Page */
html,
body {
  background: var(--sl-ivory);
}
body {
  color: var(--sl-pine);
  font-family: var(--sl-sans);
}

/* Top bar, drawn with CSS so the DOM stays as it was. Layout pages only.
   The title is a link home (a.home-link) placed over the bar; its text comes from CSS too,
   so the page text that tests read is unchanged. */
body:has(> #page-footer)::before,
body:has(> #page-footer) > a.home-link {
  font-family: var(--sl-serif);
  font-size: 1.375em;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 1.1em 1.5em;
}
body:has(> #page-footer) > a.home-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  color: var(--sl-ivory);
  text-decoration: none;
}
body:has(> #page-footer) > a.home-link::before {
  content: "The Internet";
}
/* Text only, placed just outside the link's box so a click on it doesn't go home.
   The link's aria-label keeps its name. 1em here is 0.6 of the link's em, so its 1.5em right
   padding is 2.5em: left = 100% - 2.5em + 1em gap. */
body:has(> #page-footer) > a.home-link::after {
  content: "powered by Sauce Labs";
  position: absolute;
  left: calc(100% - 1.5em);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sl-sans);
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--sl-ivory);
  opacity: 0.8;
  white-space: nowrap;
  pointer-events: none;
}
body:has(> #page-footer) > a.home-link:hover,
body:has(> #page-footer) > a.home-link:focus {
  color: var(--sl-highlight);
}

/* The GitHub ribbon is hidden, not removed: tests that count the images on a page still find it. */
body:has(> #page-footer) nav[aria-label="Source code"] {
  display: none;
}
body:has(> #page-footer) > a.home-link:focus-visible {
  outline: 3px solid var(--sl-highlight);
  outline-offset: -0.5em;
}
body:has(> #page-footer)::before {
  content: "\00a0";
  display: block;
  background: var(--sl-pine);
  border-bottom: 4px solid var(--sl-highlight);
}

#flash-messages {
  padding-top: 1.5em;
}

body:has(> #page-footer) #content {
  background: white;
  border: 1px solid var(--sl-warm-gray);
  border-radius: 1.5rem;
  padding-top: 2em;
  padding-bottom: 2em;
}

/* Type */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sl-serif);
  font-weight: 600;
  color: var(--sl-pine);
  letter-spacing: -0.01em;
}
h4, h5, h6 {
  color: var(--sl-pine-light);
}
.subheader {
  font-family: var(--sl-sans);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--sl-pine-light);
}
/* Icon text (e.g. the Login button label) falls back to the sans font, not serif. */
.fa {
  font-family: FontAwesome, "Atkinson Hyperlegible Next", Arial, sans-serif;
}
p,
li,
label {
  color: var(--sl-pine);
}
code,
pre,
kbd,
samp {
  font-family: var(--sl-mono);
}
hr {
  border-color: var(--sl-warm-gray);
}

a {
  color: var(--sl-deep-shock);
  text-decoration: underline;
  text-decoration-color: rgba(51, 75, 195, 0.35);
  text-underline-offset: 0.2em;
}
a:hover,
a:focus {
  color: var(--sl-pine);
  text-decoration-color: var(--sl-flare);
}

/* Home page list of examples: the page uses the full width, with up to 4 columns. */
.row:has(> #content > h1.heading) {
  max-width: calc(100% - 3em);
}
#content h1.heading + h2 {
  text-align: center;
}
#content h1.heading ~ ul {
  columns: 4 16em;
  column-gap: 2.5em;
}
/* Every item is two lines (name, description). Longer text ends with "..."; the full text is in the title. */
#content h1.heading ~ ul li {
  break-inside: avoid;
  padding: 0.35em 0;
  border-bottom: 1px solid var(--sl-ivory);
  color: var(--sl-pine-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Items clip overflow, so keep a link's focus ring inside the item. */
#content h1.heading ~ ul li a:focus-visible {
  outline-offset: -2px;
}
#content h1.heading ~ ul li[hidden] {
  display: none;
}
/* The description lives in an attribute so the text of each item stays the same. */
#content h1.heading ~ ul li[data-description]::after {
  content: attr(data-description);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85em;
  color: var(--sl-pine-light);
}
#example-filter-box {
  max-width: 28em;
  margin: 0 auto 1.75em;
  text-align: center;
}
#example-filter-box label {
  font-weight: 600;
}
#example-filter-box input {
  margin-bottom: 0.25em;
}
#example-filter-empty {
  color: var(--sl-pine-light);
}

/* Buttons (sizes unchanged) */
button,
.button {
  font-family: var(--sl-sans);
  background-color: var(--sl-pine);
  border-color: var(--sl-pine);
  color: var(--sl-ivory);
  border-radius: 9999px;
  text-decoration: none;
}
button.radius,
.button.radius {
  border-radius: 9999px;
}
button:hover,
button:focus,
.button:hover,
.button:focus {
  background-color: var(--sl-moss);
  border-color: var(--sl-moss);
  color: white;
}
button.secondary,
.button.secondary {
  background-color: var(--sl-ivory);
  border-color: var(--sl-stone);
  color: var(--sl-pine);
}
button.secondary:hover,
button.secondary:focus,
.button.secondary:hover,
.button.secondary:focus {
  background-color: var(--sl-warm-gray);
  color: var(--sl-pine);
}
/* app.css puts a flash-message icon before every .success, .notice and .error; not on buttons. */
button.success::before,
.button.success::before,
button.error::before,
.button.error::before,
button.notice::before,
.button.notice::before {
  content: none;
}
button.success,
.button.success {
  background-color: var(--sl-highlight);
  border-color: #8cc865;
  color: var(--sl-pine);
}
button.success:hover,
button.success:focus,
.button.success:hover,
.button.success:focus {
  background-color: #96d26c;
  color: var(--sl-pine);
}
button.alert,
.button.alert {
  background-color: var(--sl-flare);
  border-color: #d9431a;
  color: white;
}
button.alert:hover,
button.alert:focus,
.button.alert:hover,
.button.alert:focus {
  background-color: #d9431a;
}
button[disabled],
.button[disabled],
button.disabled,
.button.disabled {
  background-color: var(--sl-stone);
  border-color: var(--sl-stone);
  color: var(--sl-pine-light);
}

/* Form fields */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
textarea,
select {
  font-family: var(--sl-sans);
  color: var(--sl-pine);
  border-color: var(--sl-stone);
  border-radius: 0.5rem;
  box-shadow: none;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  border-color: var(--sl-pine);
  outline: 2px solid var(--sl-highlight);
  outline-offset: 0;
  background-color: white;
}
input[readonly] {
  background-color: var(--sl-off-white);
}
input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--sl-forest);
}

/* Tables */
table {
  border-color: var(--sl-warm-gray);
  border-radius: 0.5rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
table thead,
table tfoot {
  background: var(--sl-pine);
}
table thead tr th,
table thead tr td,
table tfoot tr th,
table tfoot tr td {
  color: var(--sl-ivory);
}
table thead tr th a,
table thead tr th span {
  color: var(--sl-ivory);
}
table tr th,
table tr td {
  color: var(--sl-pine);
}
table tr.even,
table tr.alt,
table tr:nth-of-type(even) {
  background: var(--sl-off-white);
}

/* Flash messages and status colours */
.flash {
  border-radius: 0.5rem;
  font-weight: 700;
}
.success {
  background-color: var(--sl-forest);
  border-color: var(--sl-forest);
  color: var(--sl-ivory);
}
.notice {
  background-color: var(--sl-deep-shock);
  border-color: var(--sl-deep-shock);
  color: white;
}
.error {
  background-color: var(--sl-clay-red);
  border-color: var(--sl-clay-red);
  color: white;
}
.flash .close {
  color: white;
  opacity: 0.6;
  text-decoration: none;
}

/* Panels and modals used by some examples */
.panel {
  background: var(--sl-ivory);
  border-color: var(--sl-warm-gray);
  border-radius: 0.5rem;
}
.modal {
  border-radius: 1rem;
  border-color: var(--sl-warm-gray);
}
.modal-title h3 {
  color: var(--sl-pine);
}

/* Footer */
#page-footer {
  color: var(--sl-pine-light);
  font-size: 0.875em;
  padding: 1.5em 0 2.5em;
}
#page-footer hr {
  display: none;
}

/* Accessibility of the page chrome */
.skip-link {
  position: absolute;
  left: 1em;
  top: -10em;
  z-index: 1000;
  padding: 0.5em 1em;
  background: var(--sl-highlight);
  color: var(--sl-pine);
  font-weight: 700;
  border-radius: 0.5rem;
}
.skip-link:focus {
  top: 1em;
}
/* A clear focus ring for keyboard users; the mouse doesn't trigger it. */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
input[type="range"]:focus-visible,
input[type="file"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 3px solid var(--sl-deep-shock);
  outline-offset: 2px;
}
a:focus:not(:focus-visible) {
  outline: 0;
}
.flash .close {
  opacity: 0.85;
}
.flash .close:hover,
.flash .close:focus {
  opacity: 1;
}
.flash .close:focus-visible {
  outline-color: white;
}