

/******************** Basic layout ********************/

@font-face {
  font-family: "Packard Clipper NF";
  src: local("Packard Clipper NF"),
       url("../fonts/PackardClipperNF.otf") format("opentype"),
       url("../fonts/PackardClipperNF.ttf") format("truetype");
}

body {
  background-color: #b0b0b0;
  font-family: "Arial", "Helvetica", "sans-serif";
  letter-spacing: 0.1em;
  color: #393939;
  line-height: 1.5em;
}

.topbar img {
  padding: 0.5em;		/* SVG logo has none, so add some */
}

/* SVG image size in content-top container must be restrained: */
img.contentTop {
  width: 2em;
  height 2em;
}

.contentTop {
  margin-bottom: 2em;
}

.contentTop a.button {
  margin-top: 0em;
  height: 2.75em;
  width: auto;
}

.content {
  margin-top: 1em;
  min-height: 70vh;
}

.content,
.footer {
  max-width: 61.5rem;   /* 1rem = 16px; 984px wide fits 1024px w/ scrollbar */
  padding-top: 1em;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1em;
  padding-right: 1em;
}

.footer {
  padding-bottom: 2em;
  font-size: 0.6em;
  text-align: center;
  line-height: 1.2em;
} 

.footer hr {
  margin-top: 3em;
}

.footer hr,
.footer p {
  text-align: center;
  width: 80%; 
  margin-left: auto;
  margin-right: auto;
}


/******************** Basic elements ********************/

/* NOTE: the "jsOnly" rule is defined inline, in templates/header.php and */
/* in print.css (both are needed!); "screenOnly" is defined in print.css. */
.printOnly {
  display: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1em;
  margin-bottom: 0.5em;
}

h1 {
  font-family: "Packard Clipper NF", "Arial", "Helvetica", "sans-serif";
  font-size: 2.5em;
  font-weight: normal;	/* Packard Clipper doesn't handle faux bold well */
}

h1, h2, h3 {
  text-shadow: 2px 3px 4px #39393966;	/* Hor Ver Blur Col */
  margin-bottom: 0.75em;
}

h1.smallCaps,
h2.smallCaps,
h3.smallCaps {
  font-variant: small-caps;
}

h1.smallCaps::first-letter,
h2.smallCaps::first-letter,
h3.smallCaps::first-letter {
  font-size: 1.25em;
}

h2, h3, h4 {
  margin-top: 0.75em;
}

h4 {
  font-style: italic;
}

p {
  margin-bottom: 0em;
  padding-bottom: 1em;
  line-height: 1.5em;
}

p.error {			// We just use red on yellow here, not config colours
  color: #ff0000;
  background-color: #ffff00;
}

b,
.b {
  font-weight: bold;
}

i,
.i {
  font-style: italic;
  font-weight: medium;
}

hr {
  clear: both;
}

ul, ol {
  list-style-position: outside;
  padding-left: 1em;
  margin-bottom: 1em;
}

ul li,
ol li { margin-left: 1em;
}

ul.paragraphed li,
ol.paragraphed li {
  margin-bottom: 1em;
}

.left {					/* Ad-hoc block element floating */
  float: left;
  margin-right: 1em;
  margin-bottom: 0.5em;
}

.right {				/* Ad-hoc block element floating */
  float: right;
  margin-left: 1em;
  margin-bottom: 0.5em;
}

.center, .centered {			/* Ad-hoc block element centering */
  float: none;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.bordered {				/* Adhoc block element border style */
  border: 1px solid #000000;
}

.bordered2 {				/* Adhoc block element border style */
  border: 2px solid #000000;
}

.shadowed {				/* Same for shadowing */
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
}

.rounded {
  border-radius: 0.5em;
}

.rounded2 {
  border-radius: 1em;
}

/* On smaller screens shadows get in the way, so tone it down: */
@media (max-width: 768px) {
  .shadowed {
    box-shadow: 0em 0em 0em rgba(0, 0, 0, 0);
  }
}

.checked {	/* Check mark / OK */
  color: #eeeeee;
  background-color: #339933;
  padding-left: 0.1em;
}

.unchecked {	/* Cross mark / not OK */
  color: #eeeeee;
  background-color: #cc0000;
  padding-left: 0.1em;
}

.banner {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding: 1em;
  font-weight: bold;
  color: #ff0000;
  background-color: #ffff00;
  border: 0.25em solid #ff0000;
}

/* Add some gap below list elements, but NOT the ones used for the menu: */
li:not(.navbar li) {
  margin-bottom: 0.75em;
}

/* Sometimes it's convenient to simply assign another class to an element */
/* in order to hide it, so let's define one:                              */
.noDisplay {
  display: none;
}

/********************************* Links **********************************/

a {
  color: #990000;
  text-decoration: none;
  font-weight: bold;
}

/* Make hovers a little more balanced: */
a:not(.button) {
  padding-left: 2px;
  padding-right: 2px;
}

/* Add 'external' icon to links that take us off-site, but only on-screen. */
/* (Yes, the proper way to do this would be to do it on all media and then */
/* remove it again in the print stylesheet, but that's a big PITA, so no.) */
@media screen {

  a.external {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }

  a.external::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    background-size: contain;
    background-repeat: no-repeat;
    transition: background-color 150ms ease-in-out;
    mask-size: cover;
    mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik03LjcwNSAzLjk5OGEuNzUuNzUgMCAwIDEgLjEwMSAxLjQ5M2wtLjEwMS4wMDdINS43M2EuOTY4Ljk2OCAwIDAgMC0uOTczLjgzNWwtLjAwNy4xMXYxMS44NjJjMCAuNDgxLjM3NS44ODQuODY1LjkzOWwuMTE1LjAwNmgxMi4xMDZhLjk2OC45NjggMCAwIDAgLjk3My0uODM1bC4wMDYtLjExVjE2LjRhLjc1Ljc1IDAgMCAxIDEuNDkzLS4xMDJsLjAwNy4xMDJ2MS45MDVjMCAxLjMtMS4wMjYgMi4zNTctMi4zMTcgMi40NGwtLjE2Mi4wMDVINS43M2MtMS4zMTIgMC0yLjM5LTEuMDA2LTIuNDc1LTIuMjg0bC0uMDA1LS4xNlY2LjQ0MmMwLTEuMyAxLjAyNi0yLjM1OCAyLjMxNy0yLjQ0bC4xNjMtLjAwNWgxLjk3NXpNMjAgMy4yNWEuNzUuNzUgMCAwIDEgLjc0My42NDhMMjAuNzUgNHY2LjAyNWEuNzUuNzUgMCAwIDEtMS40OTMuMTAxbC0uMDA3LS4xMDFWNS43ODRsLTcuNjkgNy41MzVhLjc1Ljc1IDAgMCAxLTEuMTIzLS45ODhsLjA3NC0uMDgzIDcuNjUxLTcuNDk4aC00LjMxYS43NS43NSAwIDAgMS0uNzQzLS42NDhMMTMuMTAyIDRhLjc1Ljc1IDAgMCAxIC42NDgtLjc0M2wuMTAyLS4wMDdIMjB6IiBmaWxsPSJjdXJyZW50Q29sb3IiIC8+Cjwvc3ZnPgo=");
  }

}

/* This must precede the a.button selector below to avoid hover conflicts: */
a:not(.button):not(.nohover):hover {
  color: #eeeeee;
  background-color: #990000;
}

a.button {
  display: inline-block;
  white-space: nowrap;
  font-weight: bold;
  background-color: #cccccc;
  border: 2px solid #000000;
  border-radius: 0.5em;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  box-shadow: 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15);
  position: relative;	/* Required for gradient */
  z-index: 0;		/* (See section below    */
}

a.button.inline {
  display: inline;
  margin-top: 0px;
  margin-bottom: 0px;
}

/* Button gradient */
a.button:not(.disabled)::before {
  content: '';
  position: absolute;
  inset: 0px;
  background: linear-gradient(to bottom, #ffffff, #393939);
  opacity: 0.3;
  z-index: -1;
}

a.button.disabled,
input[type='button'].disabled {
  color: #808080;
  border: 2px solid #808080;
  background-color: transparent;
  cursor: none;
}

a.button:hover::before {
  background: linear-gradient(to bottom, #393939, #ffffff);
  opacity: 0.2;
}


/******************** Lazy loading images support *****************/

img.lazy {
  display: none;	/* Initially hide spinner */
}

/* Notice to display when user tries to print before all lazy      */
/* images have been loaded / cached (which messes up printing);    */
/* initially hidden in case we have no Javascript support:         */
.lazyPrintSwitch.print {
  display: none;
}


/************ Table-less (i.e. flexible) tables ************/

.table {				/* <table> */
  display: table;
}

.table .tr {				/* <tr> */
  display: table-row;
}

.table .col {				/* <col> */
  display: table-column;
}

.table .th,
.table .td {				/* <th>, <td> */
  display: table-cell;
}

.table .th {
  font-weight: bold;
}

.table .th.left,
.table .td.left {
  float: unset;
  text-align: left;
}

.table .th.right,
.table .td.right {
  float: unset;
  text-align: right;
}

.table .th.center,
.table .td.center {
  float: unset;
  text-align: center;
}


/******************** Fluid / responsive layout ********************/

.fluid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.fluid-col {
  flex: 1;
}

@media screen and (max-width: 1200px) {

  .content {
    width: 80%;
  }

  .footer {
    width: 100%;
    padding-left: 0em;
    padding-right: 0em;
  }

}

@media screen and (max-width: 992px) {

  .content {
     width: 90%;
  }

  img:not(.lazy):not(.icon):not(.contentTop) {
    float: none;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    height: auto;
  }

  .fluid-row {
    flex-direction: row;
  }

  .fluid-col {
    flex: auto;
  }

}

@media screen and (max-width: 768px) {

  .fluid-row {
    flex-direction: column;
  }

}

@media screen and (max-width: 480px) {

  .content,
  .footer {
    letter-spacing: unset;
  }

}


/*************** Desktop navigation bar ***************/

.navbar {
  display: block;
  padding-left: 1em;
  background-color: #393939;
  text-align: left;
}

.navbar a {
  color: #eeeeee;
  font-size: 1.2em;
  padding: 1px;		/* Makes hover look a little more balanced */
}

.navbar a:hover {
  color: #eeeeee;
  background-color: transparent;
}

.navbar a.active,
.navbar a.active:hover {
  color: #ad9d5b;
  pointer-events: none;
}

/* "Special case" menu buttons: */
.navbar a.newItems {
  color: #ffff00;
}

.navbar > ul > li:not(:first-child)::before {
  color: #eeeeee;
  content: '|';
  display: inline-block;
  margin-left: 1em;
  margin-right: 1em;
}

.navbar ul {
  list-style: none;
  display: flex;
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 0px;
}

.navbar ul:not(.submenu)li.has-submenu a {
  cursor: default;
}

.navbar ul li {
  position: relative;
  margin-left: 0em;
}

.navbar ul li:not(.has-submenu) a:hover {
  text-shadow: 0px 0px 6px #eeeeee;    /* Hor Ver Blur Col */
}

.navbar ul li.has-submenu > a::after {
  content: " \25BC";		/* Down-pointing triangle */
  font-size: 0.75em;
  margin-left: 0.25em;
}

.navbar li.has-submenu a:hover {
  color: #eeeeee;
}

.navbar li.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .submenu {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 1.25em;
  text-align: center;
  z-index: 100;
  background-color: #393939dd;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3em);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar .submenu li:not(:last-child) {
  border-bottom: 1px solid #eeeeee;
}

.navbar .submenu li a {
  display: block;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

/* "Go to top" floating nav widget */
a.button.toTop {
  display: none;        /* Initially hidden */
  opacity: 0.75;
  position: fixed;
  bottom: 2em;
  right: 2em;
  z-index: 100;
  cursor: pointer;
}

@media (max-width: 768px) {

  a.button.toTop {
    bottom: 0.5em;
    right: 0.5em;
  }

}

/******************** Mobile menu ********************/

button#menu-toggle {
  display: none;		/* Initially hide hamburger button */
  text-align: left;
  cursor: pointer;
  font-size: 1.5em;
  color: #393939;
  background-color: #b0b0b0;
  outline: 0.15em solid #393939;
  border-radius: 0.25em;
  margin: 0.5em;
  padding: 0.1em; 
}

/* Swap menus on breakpoint */
@media screen and (max-width: 992px) {

  .navbar {
    display: none;		/* Initially hide navbar */
    width: max-content;
    margin-left: 0.5em;
    padding-right: 1em;
    padding-top: 0.15em;
    padding-bottom: 0.25em;
  }

  button#menu-toggle {
    display: block;		/* Show hamburger button */
  }

  .navbar ul {
    flex-direction: column;	/* Stack menu items vertically */
    padding: 0em;
  }

  .navbar ul li:not(:last-child) {
    border-bottom: 1px solid #eeeeee;
  }

  .navbar > ul > li::before {
    content: none !important;			/* Replace '|' separators */
    border-bottom: 1px solid #b0b0b0;	/* with ------ separators */
  }

  .navbar .submenu {
    position: static;
    transform: none;
    transition: none;
    visibility: visible;
    opacity: 1;
    background-color: transparent;
    text-align: left;
    font-size: 0.9em;
  }

  .navbar li.has-submenu > a,
  .navbar li.has-submenu > a:hover {
    color: #b0b0b0;
    cursor: default;
  }

  .navbar .submenu li:not(:last-child) {
    border-left: none;				/* Remove hor. separators */
    border-right: none;				/* Remove hor. separators */
  }

  .navbar .submenu li a {
    display: block;
    margin-top: 0em;
    margin-bottom: 0em;
    margin-left: 1em;
  }

  .navbar .has-submenu:hover .submenu {	/* Disable hover animation on mobile */
    opacity: 1;
    visibility: visible;
    transform: none;
  }

}


/********** Announcements / notifications banner at top of page ***********/

.notice {
  position: relative;	/* Needed for absolute close button positioning */
  color: #393939;
  background-color: #ad9d5b;
  font-size: 1.5em;
  font-weight: bold;
  display: block;
  text-align: center;
  margin-left: 3em;
  margin-right: 3em;
  margin-top: 1.25em;
  margin-bottom: 0.75em;
  padding: 0.5em;
  border: 2px solid #393939;
  border-radius: 0.75em;
  box-shadow: 0.25em 0.25em 0.25em rgba(0, 0, 0, 0.25);
}

/* Notice banner "close" button (X) */
.notice a.close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);	/* Straddle topright corner 50% */
  font-size: 1.5rem;
  width: 2em;
  height: 2em;
  color: #990000;
  background-color: #ad9d5b;
  border: 0.25em solid #393939;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0.25em 0.5em rgba(0,0,0,0.25);
  overflow: hidden;
}

.notice a.close:hover {
  color: #eeeeee;
  background-color: #990000;
  border: 2px solid #eeeeee;
  outline: none;
}

@media screen and (max-width: 480px) {
  
  .notice {
    margin-left: 1em;
    margin-right: 1em;
    padding: 0.25em;
  }

  .notice a.close {
  transform: translate(50%, -50%) scale(0.75);
  }
} 


/************************* Products search feature ************************/

input[type='search'] {
  border-radius: 0.3em;
  box-sizing: border-box;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2em;
  height: 2em;
  background-color: #eeeeee;
  background-image: url(../imagesPHP/magnifyingGlass.svg.php);
  background-repeat: no-repeat;
  background-position: 98% 50%;		/* H V */
  background-position: calc(100% - 0.25em) center;
  background-size: 1em 1em;
  border: 2px solid #393939;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 0.8em;
  padding-right: 30px;
}

input[type='search']:focus {
  color: #393939;
  background-color: #f0f0c0;
  border: 2px solid #393939;
  box-shadow: inset 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 480px) {
  
  input[type='search'] {
    display: block;
    width: 100%;
    float: none;
    margin-top: 0.5em;
  }

} 

.prodSearchRes {			/* Search results */
  display: table;
  border: 1px solid #b0b0b0;
  border-radius: 0.5em;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
  width: 95%;
  margin-left: 0.75em;
  margin-right: 0.75em;
  margin-bottom: 2em;
  padding: 1em;
}

.prodSearchRes .tr {
  display: table-row;
}

.prodSearchRes .td {
  display: table-cell;
}


/****************** Dynamic "toast" popup message *********************/

.toast {
  position: fixed;
  bottom: 1.25em;
  right: 1.25em;
  color: #333333;
  background-color: #eeeeee;
  font-weight: bold;
  padding: 1em 1.25em;
  border: 0.25em solid #990000;
  border-radius: 0.25em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
}


/******************************** Forms *******************************/

.grecaptcha-badge {
  visibility: hidden;	/* Requires mentioning in footer for compliance */
}

.myForm {					/* Container */
  background-color: #eeeeee;
  padding: 1em;
  border: 1px solid #333333;
  border-radius: 0.75em;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
}

.myForm h1 {
  margin-bottom: 0.5em;
}

.myForm h2 {
  margin-bottom: 1em;
}

.myForm .formContainer {
  display: grid;
  grid-template-columns: auto auto auto;
}

.myForm .formRow {
  display: contents;
}

/* If the formRow contains a fcLineTemplate table (with small print labels */
/* positioned above the input boxes) we need some additional space above   */
/* the label, but we can't assign a class to the label in this case, since */
/* the formClass code doesn't support it, so we'll have to resort to more  */
/* heroic CSS selects. Not supported in older browsers, but not critical.  */
.myForm .formRow:has(.formTemplate > table.fcLineTemplate) > .formLabel {
  padding-top: 0.6em;
}

.myForm .formLabel {
  vertical-align: top;
  text-align: right;
  padding-right: 0.5em;
  white-space: pre-wrap;
  word-break: keep-all;
  margin-bottom: 0.5em;
}

.myForm .formError {
  background-color: transparent;	/* Error icon appears here */
  padding-left: 1px;
  padding-right: 1px;
}

.myForm .formErrorMsg {
  font-weight: bold;
  color: #990000;
  background-color: transparent;
  padding-left: 1em;
  margin-bottom: 1em;
}

.myForm form ul {
  list-style-position: inside;
  margin-bottom: 1em;
}

.myForm .formTemplate {
  max-width: 100%;
  text-align: left;
  margin-bottom: 0.25em;
}

.myForm .breakAfterElement,
.myForm .breakAfterLabel {
  display: block;
  margin-bottom: 1em;
}

.myForm .reCaptchaV2 {
  grid-column: 1 / -1;	/* Span all grid columns */
  float: right;
  margin-left: auto;
  margin-right: 0px;
  margin-bottom: 1em;
  display: inline-block;
}

.myForm .formTemplate:has(#reCaptchaV2) {
  padding-top: 0.25em;
}

.myForm input,
.myForm textarea,
.myForm select {
  color: #000000;
  background-color: #ffffff;
  box-sizing: border-box;
  border: 1px solid #000000;
  border-radius: 0.3em;
  margin-top: 2px;
  margin-left: 0px;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-top: 0.15em;
  padding-bottom: 0.15em;
  box-shadow: inset 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.15);
}

.myForm input:not([type="checkbox"]),
.myForm textarea,
.myForm select {
  width: 100%;
}

.myForm input[type='radio'] {
  width: 1em;
  margin-right: 0.25em;
}

.myForm input.number,
.myForm input[type='number'] {
  width: 6em;
  text-align: right;
}

.myForm input:focus,
textarea:focus,
myForm select:focus {
  background-color: #f0f0c0;
}

.myForm input.error {
  background-color: #ff5f49;
}

.myForm textarea {
  min-height: 5em;
  padding-top: 0.25em;
}

.myForm input.image {
  width: auto;
  height: auto;
  background-color: transparent;
}

/* Date and time fields for notices */
.myForm .datetime {
  display: block;
  white-space: nowrap;
}

.myForm .datetime select {
  margin-left: 0.25em;
}

.myForm .datetime select[name="dateDisplayFromyear"],
.myForm .datetime select[name="dateDisplayUntilyear"] {
  display: inline-block;
  width: 4em;
}

.myForm .datetime select[name="dateDisplayFrommonth"],
.myForm .datetime select[name="dateDisplayUntilmonth"] {
  display: inline-block;
  width: 3.5em;
}

.myForm .datetime select[name="dateDisplayFromday"],
.myForm .datetime select[name="dateDisplayUntilday"],
.myForm .datetime select[name="dateDisplayFromhour"],
.myForm .datetime select[name="dateDisplayUntilhour"],
.myForm .datetime select[name="dateDisplayFrommin"],
.myForm .datetime select[name="dateDisplayUntilmin"],
.myForm .datetime select[name="dateDisplayFromsec"],
.myForm .datetime select[name="dateDisplayUntilsec"] {
  display: inline-block;
  width: 3em;
}

/* Note: form submit button styling (below) largely duplicates a.button */
/* styling. Not ideal and a maintenance PITA, but at least it maintains */
/* style sheet structuring, messing up of which would be even worse.    */

button {
  white-space: nowrap;
}

button.formSubmit {
  font-weight: bold;
  color: #990000;
  background-color: #cccccc;
  border: 2px solid #000000;
  border-radius: 0.5em;
  min-width: 4em;
  text-align: center;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  cursor: pointer;
  float: right;
  box-shadow: 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15);
  position: relative;	/* Required for gradient */
  z-index: 0;		/* (See section below    */
}

button.formSubmit:not(.disabled)::before {
  content: '';
  position: absolute;
  inset: 0px;
  background: linear-gradient(to bottom, #ffffff, #393939);
  opacity: 0.3;
  z-index: -1;
}

.myForm input.disabled,
.myForm input.disabled:hover,
.shoppingCart input.disabled,
.shoppingCart input.disabled:hover,
.myForm select.disabled,
.myForm select.disabled:hover,
.shoppingCart select.disabled,
.shoppingCart select.disabled:hover,
 button.formSubmit.disabled,
 button.formSubmit.disabled:hover {
  color: #808080;
  border: 2px solid #808080;
  background-color: transparent;
  cursor: none;
}

button.formSubmit:hover::before {
  background: linear-gradient(to bottom, #393939, #ffffff);
  opacity: 0.2;
}

.myForm .required {
  color: #990000;
  font-size: smaller;
  vertical-align: super;
  margin-left: 0.25em;
}

/* Mark form fields that contain errors (does not work on checkboxes): */
.myForm .fieldError {
  background-color: #ff5f49;
}

/* A brutal hack to mark checkboxes with errors: */
.myForm .formtemplate .fieldError {
  background-color: #ff5f49;
}

/* Multi-field line templates: */
.myForm .fcLineTemplate {
  display: inline-flex;
  gap: 0.5em;
  width: 100%;
  justify-content: space-between;
  font-size: 0.75em;
}

.myForm .fcLineTemplate td {
  padding-top: 0.4em;
}

.myForm .fcLineTemplate input,
.myForm .fcLineTemplate select {
  font-size: 1rem;
}

.myForm .fcLineTemplate select {
  height: 1.75em;
}

.myForm .fcLineTemplateField {
flex: 1 1 0;			/* Shrink or expand as needed */
}

.myForm .fcLineTemplateFieldLabel {
  font-size: 0.6em;
}

.myForm .formLabelSmall {
  /* margin-bottom: 1em;	Has no effect */
}

/* "What word did you try first?" asked Piglet. "Hunny", said Pooh. :-) */
.myForm .formRow.hp {
  height: 0px;
  overflow: hidden;
  position: relative;
  background-color: #eeeeee;
}

.myForm .formRow.hp * {
  font-size: 0px;
  line-height: 0px;
  color: transparent;
  background-color: #eeeeee;
  height: 0px;
  border: 0px;
}

@media screen and (max-width: 768px) {

  .myForm .formContainer {
    display: flex;
    flex-direction: column;
  }

  .myForm .formRow {
    display: flex;
    flex-direction: column;
  }

  .myForm .formRow:has(input[type='checkbox'])  {
    display: flex;
    flex-direction: row;
  }

  .myForm .formRow:has(input[type='checkbox']) .formTemplate {
    align-self: flex-end;
    margin-bottom: 0.5em;
  }

  .myForm .formLabel {
    text-align: left;
    margin-bottom: 0em;
  }

  .myForm .formError {
    order: 1;
    display: inline-block;
    margin-right: 0.35em;
  }

  .myForm .formTemplate {
    order: 1;
    display: inline-block;
  }

  .myForm .fcLineTemplate {
    display: flex;
    flex-direction: column;
  }

  .myForm .fcLineTemplateFieldSpacer {
    display: none;
  }

  .myForm input {
    width: unset;
  }

  .myForm span.breakAfterLabel {
    display: none;
  }

  .myForm .formRow.reCaptchaRow {
    display: block;
  }

}

@media screen and (max-width: 480px) {
  .myForm .reCaptchaV2 {
    float: left;
  }
}

@media screen and (max-width: 430px) {

  .myForm .reCaptchaV2 {
    transform: scale(0.75);	/* Reduce widget size */
    transform-origin: 0 0;
  }

}

/************************* Account and order details ******************/

.table.accountDetails,
.table.orderDetails {
  margin-top: 1em;
  padding: 1em;
  border: 1px solid #393939;
  background-color: #eeeeee;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
}

.table.accountDetails .tr .th:not(:last-child),
.table.accountDetails .tr .td:not(:last-child),
.table.orderDetails .tr .th:not(:last-child),
.table.orderDetails .tr .td:not(:last-child) {
  padding-right: 1em;
}

.table.orderDetails .tr.gap-below .td {
  padding-bottom: 1em;
}

.table.accountDetails .td,
.table.orderDetails .td {
  background-color: #3939390f;
  padding-left: 0.5em;
  padding-right: 0.5em;
  border-right: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}

.table.orderDetails.goods .tr:nth-last-child(2) .td {
  padding-bottom: 1em;
}

.table.orderDetails.goods .tr:last-child .td {
  border-top: 1px solid #393939;
}

.table.orderDetails.goods .th {
  border-bottom: 1px solid #393939;
}

.orderHistoryForm {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
  

/******************** Shopping Cart and Product Gallery *******************/

/* NOTE: Shopping cart control buttons are styled along with the rules */
/* for forms - see that section for details                            */

p.prodCatIntro {		/* Not included within cart container! */
  margin-bottom: 1em;
}

p.prodCatIntro img {
  float: right;
  margin-left: 1em;
  margin-bottom: 0.5em;
  border-radius: 0.5em;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
}

.productGallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
  gap: 2em;
  padding: 1em;
  margin-bottom: 1em;
  width: fit-content;
  max-width: 100%;
  color: #393939;
  background-color: #eeeeee;
  border: 1px solid #333333;
  border-radius: 0.75em;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
  justify-items: start;
}

.productGallery .product {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.productGallery .product .productImage {
  border: 2px solid #393939;
  border-radius: 0.75em;
  overflow: hidden;
}

.productGallery .product .description {
  margin-top: auto;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.productGallery .product .description .new {
  font-weight: bold;
  color: #008000;
}

.productGallery .product .description .sold {
  font-weight: bold;
  color: #ff0000;
}

.shoppingCart {					/* Outer layout container */
  color: #393939;
  background-color: #eeeeee;
  border: 1px solid #333333;
  border-radius: 0.75em;
  box-shadow: 0.5em 0.5em 1em rgba(0, 0, 0, 0.25);
  padding: 1em;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 1em;
}

.shoppingCart > div {				/* Inner layout container */
  display: table;
  border-collapse: separate;
  border-spacing: 0em 0.5em;
}

/* Qtty fields in forms (both for webshopt and cart contents */
.shoppingCart input[type="number"] {
  border: 1px solid #393939;
  border-radius: 0.25em;
  padding: 0.2em;
  width: 3.5em;
  text-align: center;
  vertical-align: middle;
  margin-right: 0.25em;
}

/* Webshop - where we list the products and the add-to-cart options */

.shoppingCart .webshop .product:not(:last-of-type) {
  padding-bottom: 2em;
  border-bottom: 2px solid #393939;
  margin-bottom: 2em; 
}

.shoppingCart .webshop .product .productImageWrapper {
  float: right;
}

.shoppingCart .webshop .product .productImage {
  margin-left: 1em;
  border: 2px solid #393939;
  border-radius: 0.75em;
  display: block;
  overflow: hidden;
}


.shoppingCart .webshop .product .productName {
  font-weight: bold;
  font-size: 1.25em;
  margin-bottom: 0.5em;
}

.shoppingCart .webshop .product .sku {
  font-weight: bold;
  margin-bottom: 0.75em;
}

.shoppingCart .webshop .product .description {
  text-align: justify;
}

/* Length / width / height / etc. */
.shoppingCart .webshop .product .description .description2 {
  margin-top: 1em;
  display: block;
  font-weight: bold;
}

.shoppingCart .webshop .product .price {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 1em;
  text-align: left;
  color: #990000;
  margin-bottom: 0.5em;
  white-space: nowrap;
}

/* SVG images must be restrained or they will hog all available space: */
.shoppingCart .webshop .product .description img.newProduct,
.shoppingCart .webshop .product img.specialOffer {
  width: 5em;
  height: auto;
}


.shoppingCart .webshop .discounted  {
  display: inline-block;
  white-space: normal;
}

.shoppingCart .webshop .discounted > .oldprice {
  text-decoration: line-through;
}

.shoppingCart .webshop .discounted > .newprice {
  font-size: 2em;
}

.shoppingCart .webshop .stockStatus {
  margin-bottom: 1em;
}

/* In order to properly align the 'qtty' field and the 'Add' button we */
/* need to use flex, but the screenOnly span gets in the way here. So  */
/* assign the following not to the form but to the screenOnly span:    */
.shoppingCart .webshop form .screenOnly {
  display: flex;
  align-items: center;
  gap: 1em;
}

.shoppingCart .webshop form button {
  vertical-align: center;
}

/* Cart contents - where we list the goods ordered, prices, 'remove' etc. */

.shoppingCart .cartContents > div {
  display: table-row;
}

.shoppingCart .cartContents > div > div {
  display: table-cell;
  border-spacing: 0px 1em;
}

.shoppingCart .cartContents .header > div {	/* Header row */
  font-weight: bold;
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #393939;
}

.shoppingCart .cartContents .lineItem > div {	/* Line item row */
  vertical-align: middle;
}

.shoppingCart .cartContents .lineItem form {	/* Qtty and 'remove' button */
  display: inline-block;
  vertical-align: middle;
}

.shoppingCart .cartContents .qtty,
.shoppingCart .cartContents .price {		/* Qtty and Price columns */
  text-align: right;
  white-space: nowrap;
}

.shoppingCart .cartContents .price {		/* Price column */
  padding-left: 1em;
  padding-right: 1em;
}

.shoppingCart .cartContents .total > div {	/* Total amount due row */
  border-top: 2px solid #393939;
  font-weight: bold;
  padding-top: 0.5em;
  padding-bottom: 1em;
}

/* Because "text-decoration: underline;" is prone to browser quirks      */
/* (the underline is interrupted by comma's etc.) we simulate this using */
/* a double border on the container div, which is more reliable than     */
/* other quirks-mode workarounds:                                        */
.shoppingCart .cartContents .total .price,
.shoppingCart .checkout .total .price {
  display: inline-block;
  border-bottom: 6px double #393939;
  padding-bottom: 0px;
}

/* The Continue Shopping / Checkout / Empty Cart buttons live outside    */
/* the cartContents container, since they must be able to stretch across */
/* the entire cart rather than be confined to a single table column:     */
.shoppingCart .controls {
  display: flex;
  flex-direction: row;
  gap: 0.25em;
}

/* Checkout - order summary, delivery address and payment options */

.cartCheckoutContainer {
  margin-top: 1em;
  width: 100%;
  text-align: left;
}

.cartCheckoutContainer .shoppingCart {
  display: block;
  width: 100%;
  vertical-align: top;
  text-align: left;
}

.cartCheckoutContainer .shoppingCart h2 {
  margin-bottom: 0em;
}

.shoppingCart .checkout.orderSummary .header,
.shoppingCart .checkout.deliveryDetails .header,
.shoppingCart .checkout.orderSummary .product,
.shoppingCart .checkout.orderSummary .total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5em;
}

.shoppingCart .checkout.orderSummary .header,
.shoppingCart .checkout.deliveryDetails .header {
  margin-bottom: 0.5em;
}

.shoppingCart .checkout.paySelect .header {
  margin-bottom: 1.5em;
}

.shoppingCart .checkout.orderSummary .total .price {
  margin-top: 0.5em;
  font-weight: bold;
}

.shoppingCart .checkout.paySelect .formTemplate {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.5em;
  margin-bottom: 0.75em;
}

.shoppingCart .checkout.paySelect button {
  float: left;
}

.shoppingCart .checkout.paySelect .yocoLogo {
  color: #ffffff;
  font-weight: bolder;
  background-color: #00a8df;
  border-radius: 0.75em;
  padding-top: 0.2em;
  padding-bottom: 0.1em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  margin-right: 0.5em;
}


@media (max-width: 992px) {

  /* Cart */

  .shoppingCart .cartContents .header {
    display: none;
  }

  .shoppingCart .cartContents .total,
  .shoppingCart .cartContents .total .desc {
    display: block;
    text-align: center;
  }

  .shoppingCart .cartContents .total {
    margin-bottom: 1em;
  }

  .shoppingCart .cartContents .total div:empty {
    display: none;
  }

}

@media (max-width: 768px) {

  /* Online store */

  .shoppingCart .webshop .product .productName {
    line-height: 1.1em;
  }

  .shoppingCart .webshop .product .description {
    text-align: left;
  }

  /* Cart */

  .shoppingCart .cartContents .lineItem ,
  .shoppingCart .cartContents .lineItem .desc,
  .shoppingCart .cartContents .lineItem .price,
  .shoppingCart .cartContents .total {
    display: block;
  }

  .shoppingCart .cartContents .lineItem {
    background-color: #99000011;
    padding-left: 0.25em;
    padding-right: 0.25em;
    margin-bottom: 1em;
  }

  .shoppingCart .cartContents .lineItem .price.each {
    text-align: left;
    padding-left: 0px;
    font-weight: bold;
  }

  .shoppingCart .cartContents .lineItem .price.subtotal {
    display: none;
  }

}

@media (max-width: 480px) {

  /* Online store */

  a.button.right {	/* Grid / details selection button          */
    float: none;	/* (Located outside shopping cart container */
  }

  .shoppingCart .webshop .product .productImageWrapper,
  .shoppingCart .webshop .product img.webshopProduct {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    float: none;
  }

  /* Cart */

  .shoppingCart .controls {
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
  }

}


/* ****************************** Invoice ******************************* */

/* Invoices are used for both website and email. The styles below are     */
/* partially duplicated in the invoiceEmailHtmlTop.TPL.php shopping cart  */
/* template for inclusion in HTML email. This poses a challenge, since we */
/* use the same HTML code for web and email, and that means we MUST use   */
/* tables because HTML email doesn't play nicely with div tags in a table */
/* layout. That means clunky styling, but there's no way around that.     */

table.invoice {
  margin: 50px auto 10px;
  background-color: #eeeeee;
  padding: 50px;
  border-top: 0.75em solid #333333;
  border-bottom: 1px solid #333333;
  border-left: 1px solid #333333;
  border-right: 1px solid #333333;
}

table.invoice th.header {
        border: 1px solid #cccccc;
        padding: 1em;
     text-align: center;
        font-weight: bold;
        font-size: 150%;
}

table.invoice td.divider {
  padding-top: 1.5em;
  padding-bottom: 1.5em;
}

table.invoice td.spacer1 {
  height: 1em;
}

table.invoice td.spacer2 {
  height: 2em;
}

table.invoice td.orderDetailsLabel {
  width: 50%;
  font-weight: bold;
  padding-right: 1em;
}

table.invoice td.orderDetailsData {
  width: 50%;
  font-weight: normal;
}

table.invoice td.customerDetails {
  width: 50%;
  padding-right: 1em;
  vertical-align: top;
}

table.invoice td.customerDetails .label {
  font-weight: bold;
}

table.invoice table.lineItems {
  width: 100%;
}

table.invoice table.lineItems th {
  font-weight: bold;
}
table.invoice th.lineItemDesc, table.invoice td.lineItemDesc {
  text-align: left;
}
table.invoice th.lineItemDesc {
  border-bottom: 1px solid #393939;
}

table.invoice th.lineItemQty, table.invoice th.lineItemPrice,
table.invoice th.lineItemTot {
  border-bottom: 1px solid #393939;
}

table.invoice th.lineItemQty, table.invoice th.lineItemPrice,
table.invoice th.lineItemTot, table.invoice td.lineItemQty,
table.invoice td.lineItemPrice, table.invoice td.lineItemTot {
  text-align: right;
  padding-left: 1em;
}

table.invoice tr.totalDue td {
  border-top: 1px solid #393939;
}

table.invoice td.footer {
  border: 1px solid #cccccc;
  padding: 2em;
  text-align: center;
}

table.invoice hr {
  border-top: 1px solid #393939;
  clear: both;
}

@media screen and (max-width: 768px) {

  table.invoice {
    width: auto;
    max-width: 100%;
    margin: 0px;
    padding: 1em;
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
    word-break: break-word;     /* Mozilla fix */
  }

  table.invoice th, table.invoice td {
    border: none;
  }

  table.invoice th.header {
    font-size: 120%;
    margin: 0em;
  }

  /* The following is an ugly hack with dubious browser support. However, */
  /* it's not essential but only a nice-to-have, so what the hack. :-)    */
  table.invoice td.deliveryAddress br {
    content: "";
    margin-bottom: 0.75em;
  }

  table.invoice td.orderDetailsData {
    padding-bottom: 0.5em;
  }

  table.invoice table.lineItems {
    flex-direction: column;
    background-color: #eeeeee;
  }

  table.invoice table.lineItems th {
    display: none;
  }

  table.invoice table.lineItems td {
    overflow-wrap: normal;
    word-break: normal; /* Mozilla fix */
  }

  table.invoice td:nth-child(even):not(:empty) {
    background-color: #39393909;
  }

  table.invoice td.spacer1,
  table.invoice td.spacer2 {
    padding-top: 0em;
    padding-bottom: 0em;
    height: 0.5em;
    background: transparent;
  }
 
  table.invoice td.divider {
    display: none;
  }

}

@media screen and (max-width: 480px) {

  /* Because restyling this properly for 320px is a major PITA but we don't */
  /* want to serve up mangles pages either, we'll just be brutal and not    */
  /* display it at all. It's just an extra anyway; the proper invoice is    */
  /* is being sent by Email in any case, so let's be sensible here.         */

  table.invoice {
    display: none;
  }

}

/* ***************************** Admin module ***************************** */

.content.admin {
  margin-top: 0em;
  padding-top: 0.25em;
}

.navbar.admin {
  background-color: #990000;
  margin-bottom: 1em;
}

.content.admin table:not(.fcLineTemplate) {
  width: 100%;
  color: #333333;
  background-color: #eeeeee;
  border: 2px solid #393939;
  border-spacing: 0px;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.content.admin table th.nowrap,
.content.admin table td.nowrap {
  white-space: nowrap;
}

.content.admin table th {
  font-weight: bold;
  color: #eeeeee;
  background-color: #333333;
}

.content.admin table th, 
.content.admin table td {
 padding-left: 0.25em;
 padding-right: 0.25em;
}

.content.admin table.grid th,
.content.admin table.grid td {
  border: 1px solid #393939;
}

.content.admin table button {
  margin-top: 0.25em;
}

.content.admin table.lines tr:nth-child(even) {
  background-color: #ccffcc;
}

.content.admin table.lines tr:nth-child(odd) {
  background-color: #ffffff;
}

.content.admin table.lines tr:nth-child(even)>td:nth-child(odd) {
  background-color: #ddffdd;
}

.content.admin table.lines tr:nth-child(odd)>td:nth-child(even) {
  background-color: #fbfbfb;
}

.content.admin table.lines tr.grayedout {
  color: #808080;
  text-decoration: line-through;
}

.content.admin table.lines .noticePast {
  text-decoration: line-through;
}

/* Support for a clickable sort arrow to table headers of .lines table: */
table.lines th {
    position: relative;
    cursor: pointer;
    padding-right: 1.2em !important; /* Room for arrow */
    user-select: none;
    border-right: 1px solid #eeeeee;
}

table.lines th .sort-arrow {
    position: absolute;
    right: 0.25em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
    opacity: 0.5;
    pointer-events: none;
    color: #eeeeee;
}

table.lines th.sorted-asc .sort-arrow,
table.lines th.sorted-desc .sort-arrow {
    opacity: 1;
}


.content.admin img {
  margin: 0.25em;
  border: 1px solid #393939;
}

.content.admin .extraImageRow {
  margin-bottom: 0.5em;
}

.content.admin .extraImageRow input[type='file'] {
  margin-left: 0.25em;
}

.content.admin .extraImageRow input[type='number'] {
  width: 5em;
  margin-left: 0.25em;
}

.content.admin .mainPreviewImg,
.content.admin .extraImageRow .previewImg {
  display: none;
  margin-left: 0.25em;
  vertical-align: middle;
  float: right;
}

.content.admin .extraImageRow .addImgBtn,
.content.admin .extraImageRow .removeImgBtn {
  margin-left:0.25em;
}


/* EOF */
