/* GLOBAL stylesheet */
 
 :root {
  --purple: hsl(333, 71%, 21%);
  --purpleT: hsla(333, 71%, 21%, 50%);
  --white: hsl(37, 67%, 98%);
  --tan: hsl(38, 80%, 90%);
  --tanT: hsl(38, 80%, 90%, 90%);
  --blue: hsl(191, 37%, 45%);
  --gold: hsl(39, 90%, 70%);
  --mauve: hsl(336, 43%, 36%);
  --mauveT: hsl(336, 43%, 36%, 70%);
  --mauveO: hsl(336, 43%, 36%, 90%);
  --greenGo: #28a745;
}


/* MOBILE devices are the base case (320px - 480px) */
body {
  font-size: 14px;
  padding: 0 16px;
  line-height: 1.5;
  font-family: Cambria, Georgia, serif;
  background-color:var(--blue); 
  margin:0 auto;
  color:var(--tan);
  background-image:url(../assets/pvl-crow-in-the-grass-2-top.jpg);
  background-repeat:no-repeat;
  background-size: 100% auto;
}

/* Page Layout ---------------------------*/
header, footer{
  padding:4% 0 9% 4%;
  text-align:center;
}
header h1, header p, footer p { 
  color:var(--gold);
  margin:0; padding:0;
}
header {
  color:var(--gold);
}
header p {width:200px; }
main {  
  padding:0%;
  margin:0;
}
footer {
  /* margin-top:150px; */
  background-color:var(--mauve);
  margin:2% -5% 0 -10%;
  text-align:center;
}

/* Global nav ---------------------------------*/

#global[hidden], 
#shareMenu[hidden] {
  display: none;
  position:absolute;
  z-index:1000; 
}

#toggleGlobalMenu,
#toggleShareMenu {
  margin:0 4%; 
  padding:1%; 
  font-size:150%;
  border:0 transparent; 
}
#global {margin-left:4%;}
#global a {
  color: var(--gold); 
  background-color: var(--mauveT);
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.2);
  font-weight: bold;
}
#global a:hover {
  color:var(--gold);
  background-color:var(--mauve);
}


/* Share Nav */
#socialShare  {
  position:absolute;
  z-index:1000;
  left:85%;
  top:30px;
}
#toggleShareMenu i {padding: 5px;}
#socialMenu button,
#globalMenu button {
  width:40px; 
  height:40px;
  padding: 6px 10px;
  border:0 transparent; 
  background-color:transparent;
  border:1px solid transparent;
}
#socialMenu button:hover,
#globalMenuButton {
  background-color:var(--tan);
  border:1px solid transparent;
  padding:0;margin:0;
}
 
/* Footer tools nav */
#tools {margin-bottom:2%}
#tools a {margin:0 2%; }


main {
  margin:3%;
  height: calc(100vh - 1%);   
}

/* asides, figure with media -------------------*/
aside {}
figcaption {padding:2%;font-size:95%;}
img {width:100%;}
iframe {width:100%; height:320px;} /* use calc here */
.right {float:right;  margin:0 0% 2% 2%;}
.left {float:left;  margin:0 2% 2% 0%;}
.forty {width:40%;}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
/* ICONS */
a span,
a i, i
 {vertical-align:bottom; line-height:1;}


/* Typography ----------------------------*/
code {
  background: #e9edef; /* moondust derivied*/
  padding:1%;
  font-size:90%;
}

h1, h2 {
  font-family: Georgia, serif;
  color:var(--gold);
  text-align:left;
}
h3 {
  color:var(--tan)
}
dl {text-align:left;}
p, li, dd {
  margin:0 0 1% 0; 
  color:var(--white);
}
dt {margin:0; color:var(--white);}
dd {margin-left:3%;}
a {color:var(--gold);}

/* Tables  ------------------------*/
table {
  border:1px solid var(--white); ;
  width:100%;
  color: var(--rogueWave);;
  background-color:var(--white);

  /* Collapse is recommend to remove the automatic double line. */
  border-collapse: collapse; 
  
  /* Give the table space above it */
  margin-top:3%;
}
thead {
  background-color:var(--white);  
  padding: 2%;
}
tr th {
  font-size:85%; 
  font-family:Calibri, sans-serif;
  padding:10px;
  text-align:center;
}
tr td {
  text-align:center;
  padding:10px;
  border:1px dashed var(--white); ;
}
tr:hover {
  background-color:var(--white); 
}
tr:active {color:var(--white);}

#retrieveTable td:nth-child(5) {width:150px;}
.store {width:300px;}
#quantity {color:var(--white); }


/* forms ---------------------------------*/
form {
  display:flex;
  font-family:inherit;
  /* flex-flow:row wrap; */ /* turn on when using media queries */
}
fieldset {
  margin:1% 2% 2% 0;
  border:1px solid var(--gold);
  width: calc(100% );
  padding:3%;
}

legend {
  color:var(--gold); 
}
label {color:var(--tan);}
.honeypot { /* for bad bots */
  position: absolute;
  left: -9999px;
  visibility: hidden;
}
#orderForm label,
#checkoutForm label {
  display:block;
  margin:5% 0 1% 0;
  line-height:1;
}
#searchInput {
  font-size:100%; 
  border-radius:25px; 
  border:5px solid var(--tan);
}

input {width:95%; padding:2%;}
input[type="number"] {width:100px;}
textarea {height:300px; width:95%;padding:2%;}
button, select {
  padding:3%; 
  border: 1px transparent;
  border-radius:3px;
  color:var(--offWhite); ;
  background-color:var(--mauve);
  font-family: Cambria, Georgia, serif;
  font-size:110%;
  color:var(--gold);
}
button:hover {
  background-color:var(--tan); ;
  color:var(--mauve);
  border:1px solid var(--tan);
}

#response p {background-color:var(--tan); padding:3%}
.alert {color:var(--gold);}


/* gallery----------------------------- */
#commissionList img {border:8px solid var(--mauve)}
.gallery { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content:center;
  gap: 10px;  

}
.gallery figure {
  width: calc(100%);
  border:0 transparent;
}

.loading {
  margin:0 auto; 
}
.gallery figcaption,
.gallery figcaption strong,
#commissionList figcaption,
.item-description {
  line-height:1.15;
  font-family:Calibri,sans-serif;
  font-size:90%;
  color:var(--white);
}
.gallery figcaption strong,
.item-title {
  font-weight:900;
  font-size:1.15em;
  color:var(--tan);
}
.gallery img,
.gallery a img {
  width: 100%;
  background-color:var(--white);  /* not working */
  border:10px solid var(--purple);
}
.gallery img:hover {
  box-shadow: 1px 0 15px 5px var(--purpleT);
  cursor:zoom-in;
  background-color:var(--white);
}

 
/* Modal-----------------------------*/
.modal,
.modal-overlay {
  display: none;                /* start hidden */
  position: fixed;
  top: 0; left: 1%;
  width: 100vw; height: 100vh;
  background: var(--purpleT);
  z-index: 9999;
  justify-content: center;      /* center modal content */
  align-items: center;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  padding: 1rem;
  overflow: auto;
  background: var(--blue);
  box-shadow: 0 0 20px var(--purple);
  border-radius: 5px;
  text-align: center;
}

.modal-content img {
  max-height: 70vh;
  max-width: 70vw;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.modal-close {
  position: absolute;
  top: 3rem;
  right: 2.5rem;
  padding:1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color:var(--white);
  cursor: pointer;
  z-index: 10001;
}
.modal-close:hover {
  background-color:var(--blue);
  color:var(--white);

}

.sr-only { /* Screen Readers */
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Templates and Cart -------------------------------*/
/* Shopping Cart Button  */
.viewCart {
  text-align:right;
}

.viewCart a {
  color: var(--gold); 
  background-color: var(--mauveT);
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.2);
  font-weight: bold;
}

.viewCart a:hover {
  background-color: var(--tanT);
  color:var(--mauve);
}

#home-template {}
#pubs-template {}
#exhibit-template {}
#commission-template { }
#cartItemTemplate {}

#checkoutForm,
.cartGallery {
  display:flex;
  flex-flow:row wrap;
}
#cartItems {
  width: calc(100%);
}
#cartItems figure {
  border: 1px solid var(--tan);
}
#cartItems figcaption {
  padding:0 10px;
}
/*#commissionList figure {*/
/*  width:70%;*/
/*}*/
.cartGallery figure {
 width:200px;
}

/* in the figure */
#cartItemTemplate .image-item {border:1px solid var(--gold);  }
.item-title {}
.item-description {}
.item-price {color:var(--white);  }
.lazy-img {}
.image-item {color:var(--white);}
.quantity-text {}
#cartItemTemplate .image-item figcaption {padding:3%;}

/* quantity controls */
.quantityControls {
  display: flex;
  align-items: center;
  justify-content:space-evenly;
  gap: 0.25rem;
  margin-top: 0.5rem;
} 
.decrease {}
.increase {}
.remove { }

/* section of items in the cart */
.cartGallery {}
#cartTotal { 
  background-color:var(--mauve);
  padding:2%;
  text-align:right;
  font-weight:bold;
  font-size:120%;
}


/* resume */
.hidden {
  display:none;
}
/* Pagination ----------------------------*/
#pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

#pagination button {
  padding: 0.2rem .7rem .4rem;
  font-size: 1.2rem;
  border-radius: 5px;
  border: 0px solid transparent;  

  color: var(--gold);
  cursor: pointer;
  transition: background-color 0.2s;
}

#pagination button.active,
#pagination button:hover {
  background-color: var(--tan);
  color: var(--mauve);
}
.sticky {  position:sticky; top:0; left:0; background-color:var(--blue);}

/* Notification ----------------------*/
#notification {
  background: green;
  color: var(--white);
  padding: 1rem 2rem;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999; /* Higher than modal */
  transform: translate(-50%, -50%);
  display: none; /* hidden by default */
  border-radius: 6px;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  text-align: center;
}


/* MEDIA QUERIES inherit the body above ---------------*/

/* Small tablets and larger mobile devices (481px - 768px) */
@media (min-width: 481px) {
  body {
    font-size: 15px;
    padding: 0 20px;
  }
  header p {width:260px;}
  .gallery figure {
    width: calc(100%  - 9%) ;
  }
}

/* Tablets and small laptops (769px - 1024px) */
@media (min-width: 769px) {
  body {
    font-size: 16px;
    padding: 0;
    max-width: 97%;
    margin: 0 auto;
  }

  .gallery figure, 
  fieldset {
    width: calc(100% / 2 - 9%);
  }
  
    h2 {margin-top:9%}

}

/* Large desktops and high-resolution screens (1025px and up) */
@media (min-width: 1025px) {
  body {
    font-size: 18px;
    padding: 0;
    max-width: 90%;
  }
  h2 {margin-top:11%}
  form {
    flex-flow:row wrap;   /* turn on when using media queries */
  }
  .gallery figure {
    width: calc(100% / 3 - 9%);
  }

  fieldset {
    width: calc(100% / 3 );
  }
  
}

/* Extra-large screens (1440px and up) */
@media (min-width: 1440px) {
  body {
    font-size: 20px;
    padding: 0;
    max-width: 95%;
  }

}