root {
  /* this is related to node_modules/product.js member 'thumbsize' and public/js/mod/Product.js const 'thumbsize' */
  --thumbsize: 150px;
  --focussize: 650px;
}

body {
  background-image: url('/image/modstar_tile.png');
  background-repeat: repeat;
  background-position: center;
  font-family: Helvetica, sans-serif;
}

a {
  border: none;
  text-decoration: none;
}

/* basic layout for web browsers */

.main {
  margin: 0 auto 0;
  width: 730px;
  background-color: #fff;
  height: 100%;
  padding-bottom: 100px;
}

.main > * {
  text-align: center;
} 

/* header with logo */

#head.main {
  padding-top: 30px;
  padding-bottom: 20px;
  position: relative;
  flex: auto;
  display: flex;
}

#head.main > #logo img {
  width: 300px;
}

#topright {
  position: absolute;
  right: 0px;
  top: 0px;
  margin: 20px;
  text-align: right;
}

#topright a {
  display: inline-block;
}

#topright img {
  width: 40px;
  height: 40px;
}

#topright object {
  width: 40px;
  height: 40px;
  pointer-events: none;
}

#topright > #admin{
  font-family: Helvetica, sans-serif;
  font-size: 24pt;
  display: flex;
  flex-direction: column;
}

a#adminlink, a#logoutlink {
  display: none;
}

/*admin head */

#head.admin > #logo img {
  width: 300px;
}

#head.admin {
  flex: auto;
  display: flex;
  flex-direction: row;
  text-align: left;
  padding: 10px;
  margin-top: 40px 2em 2em;
  background-color: #fff;
}

#head.admin > #logo {
  text-align: left;
}

#head.admin > #logo img {
  margin-left: 1em;
}

#head.admin > #headline {
  width: 100%;
  text-align: center;
}

#head.admin > #logout {
  display: flex;
  flex-direction: column;
}

#head.admin > #logout img {
  width: 40px;
  height: 40px;
}

#head.admin > #headline > h1 {
  text-align: center;
  font-size: 50pt;
  font-family: Helvetica, sans-serif;
}

#index.main h1 {
  margin: 0;
}

#main.admin {
  background-color: #fff;
  width: 730px;
  margin: auto;
}

#main.admin section {
}

/* product gallery */

.main > #gallery { 
  display: block;
  text-align: center;
  width: 100%;
  margin: auto;
}

.main > #gallery > #product_list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 660px;
  margin: auto;
}

/* filters */

#filter {
  display: inline-block;
  padding: 0.3em;
  border: solid black 2px;
  border-radius: 5px;
  margin-bottom: 1em;
}

#filter > select {
  margin-left: 1em;
  border: solid black 1px;
  border-radius: 3px;
}

/* admin record entries */

.show.adm > .display {
  display: flex;
  visibility: hidden;
  margin-left: 20px;
}

.show.adm > .display > .gallery {
  display: flex;
  flex-wrap: wrap;
  border-left: 3px solid black;
  margin-left: 10px;
  padding-left: 10px;
}

.show.adm > .display > .gallery > .galpic {
  position: relative;
  height: var(--thumbsize);
}

.show.adm > .display > .gallery img.thumb {
  height: var(--thumbsize);
  width: var(--thumbsize);
  object-fit: contain;
}

.galpic > .action {
  height: 25px;
  width: 25px;
  position: absolute; 
  border: none;
  padding: none;
  margin: none;
  background: transparent;
}
.galpic > .action > img {
  position: absolute; 
  top: 0px;
  left: 0px;
}
.galpic > .fav {
  left: 0px;
  top: 0px;
}
.galpic > .del {
  right: 0px;
  top: 0px;
}
.galpic > .rot {
  right: 0px;
  bottom: 0px;
}

/* product list entries */

.show.pub {
  margin: 5px;
}

.show.pub > .display {
  display: none;
}

.show.pub > .closer {
  display: none;
  text-align: right;
}

.show.pub.focus > .closer {
  display: block;
}


/* focussed product list entries */

.show.pub.focus {
  border: 4px solid black;
  border-radius: 6px;
  padding: 4px;
  background: white;
  position: relative;
} 

.show.pub.focus > .display {
  display: block;
}

.show.pub > img.feature{
  height: var(--thumbsize);
  width: var(--thumbsize);
}

.show.pub.focus > img.feature {
  height: var(--focussize);
  width: var(--focussize);
}

.show.pub.focus > img.feature.zoomed {
  transform: scale(2);
}

.show.pub.focus > .display > .gallery {
  overflow: auto;
  white-space: nowrap;
  width: var(--focussize);
}

.show.pub.focus > .display > .gallery img.thumb {
  height: var(--thumbsize);
  width: var(--thumbsize);
}

.show.pub.focus > .display > .list > .descr {
  margin: 1em 2em;
  text-align: left;
}

.show.pub.focus .popover {
  position: absolute;
  display: none;
  left: 60%;
  width: 50%; 
  bottom: 0%;
  background: white;
  border: 2px solid black;
  border-radius: 4px;
}

.show.pub.focus .detail {
  display: none;
  background: white;
  border: 2px solid black;
  border-radius: 3px;
}

.show.pub.focus .detail > .closer {
  text-align: right;
}

.addbasket, .rembasket {
  display: none;
}

/* account & basket forms */

form input[type=submit] {
  background-color: #8df;
}

#changepw, #updatepw {
  margin-top: 5px;
  background-color: #8df;
}

#chooser {
  display: block;
  text-align: center;
}

#chooser input {
  margin: 0.5em;
}

#login {
  display: none;
}

#login input {
  margin: 0.5em;
}

#loginmessage {
  display: none;
}

#account {
  display: none;
}

#account > #accountdata > div {
  margin-bottom: 1em;
  vertical-align: top;
}

.accountform {
  display: inline-block;
  text-align: left;
}

.accountform label {
  display: inline-block;
  vertical-align: top;
  width: 7em;
}

#checkout.main .accountform {
  display: none;
}

#checkout.main #shipping_details {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  flex-direction: row;
}

#shipmethods {
  margin-left: 1em;
}

#shipping_method {
  border-spacing: 1em 0em;
} 

#shipping_method td {
  text-align: left;
}

#shipping_method tr.shipopt td.srv button {
  width: 100%;
}

#shipping_method tr.shipopt.selected td.srv button {
  background-color: lightblue;
  font-weight: bold;
}

#shipping_method td.cost {
  text-align: right;
}

.navbutton {
  text-align: right;
}

.navbutton button {
  margin: 10px;
  font-size: 1.5em;
  display: none;
}

#accountdata h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
  text-align: center;
}

.pwalign {
  text-align: center;
  display: none;
}

#newpwinputs {
  text-align: left;
}

#oldpwinputs {
  text-align: left;
  display: none;
}

.accountform input {
  width: 20em;
}
.accountform input[type="checkbox"] {
  width: 2em;
}

#billing.accountform {
  display: none;
}

input {
  margin-bottom: 0.25em;
}

.formsquare {
  height: var(--thumbsize);
  width:calc(2 * var(--thumbsize));
}

.pwview-icon-change {
  float: right;
  margin-left: -28px;
  margin-top: 3px;
  position: relative;
  z-index: 2;
}

.pwview-icon-login {
  margin-left: -28px;
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

/* checkout page */

#basketitem {
  width: 100%;
}

#basket h3 {
  margin: 0;
  padding: 15px;
}

#basket th {
  font-weight: bold;
}
#basket th.item {
  font-weight: bold;
  text-align: left;
}
#basket th.noitem {
  text-align: center;
}

#basket td, #basket th {
  text-align: right;
  padding: 5px;
}

#basket th.total {
  border-top: 2px solid black;
}

#basket td.item {
  text-align: left;
}

.under_construction {
  text-align: center;
  background-color: yellow;
  font-size: 24pt;
  font-weight: bold;
}

/* basket action popup */

#feedback-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  height: fit-content;
  width: fit-content;
  max-height: 100vw;
  max-width: 100vh;
  overflow: auto;
  padding: 5px;
  border: 3px solid black;
  border-radius: 5px;
  background-color: #FFFCA6;
  z-index: 100;
}

#feedback-plate {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  background: transparent;
}

/* admin forms */

#newform {
  display: none;
  flex-direction: row;
}

#newform > * {
  display: inline-block;
}

#newform > form > label {
  display: inline-block;
  vertical-align: top;
  width: 7em;
}

/* EOF */
