@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

input { margin: 0; }

/* O menu não deve depender de div.css, pois ele também é usado em
   páginas (como o painel administrativo) que não carregam esse arquivo. */
header .divRow{
   display: flex;
   flex-direction: row;
   justify-content: center;
   align-items: center;
   gap: 10px;
}

header .divColumn{
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   gap: 10px;
}

.btnRec{
   cursor: pointer;
   border: 1px solid transparent;
   border-radius: 2px;
   padding: 5px;
}
.btnRec:hover{border: 1px solid white;}

header{
   display: flex;
   justify-content: space-between;
   gap: 10px;
   background-color: #4389BA;
   margin: 0;
   padding: 15px;
   color: white;
}

   header > *{
      max-height: 50px;
   }

   .divLogo img{
      height: 100%;
      background-color: white;
      border-radius: 2px;
      padding: 3px;
      box-shadow: 0 0 1em white;
   }

   #geoo{
      font-size: 30pt;
   }

   #online{
      font-size: 13pt;
   }

   #meusPedidos{
      gap: 0;
   }

   #carrinhoContainer{
      position: relative;
   }

   #atalhoAdm{
      align-items: center;
      justify-content: center;
      gap: 1px;
      min-width: 48px;
      color: white;
      font-size: 9pt;
      font-weight: bold;
      line-height: 1;
      text-decoration: none;
      box-sizing: border-box;
   }

      #atalhoAdm img{
         width: 25px;
         height: 25px;
         filter: brightness(0) invert(1);
      }

      #totalProdutos{
         position: absolute;
         top: 5px;
         margin-left: 5px;
      }

#selectIdioma{
   appearance: none;
   background-color: transparent;
   border: none;
   padding: 5px;
   color: pink;
}
#selectIdioma:hover{cursor:pointer} 

/* Profile */
#divImgProfile{
   position: relative;
}

   #imgProfile{
      cursor: pointer;
      width: auto;
      height: 40px;
      border: 1px solid lightgray;
      border-radius: 5px;
   }

   #divImgProfile:hover #divListMenu,
   #divImgProfile:focus-within #divListMenu,
   #divListMenu:hover{
      display: flex;
      flex-direction: column;
      z-index: 1000;
   }

   #divListMenu{
      display: none;
      position: absolute;
      top: 39px;
      right: 0;
      
      border-radius: 10px;
      background-color: white;
      padding: 10px 0;
      box-shadow: 0 0 1em black;
   }

      #divListMenu > a{
         display: flex;
         gap: 5px;
         text-decoration: none;
         width: 100%;
         color: grey;
         font-weight: bold;
         font-size: 15pt;
         white-space: nowrap;
         padding: 5px 20px;
      }
      #divListMenu > a:hover{background-color:lightgrey;}

      #divListMenu > #aLogin{
         color: #1A73E8;
      }

      #divListMenu > #buttonRegister{
         color: #048469;
      }

      #divListMenu > #aLogout{
         color: red;
      }
      #divListMenu > #aLogout:hover{background-color: rgba(255, 0, 0, 0.356);}

      #divListMenu > hr{
         margin: 4px 0;
         width: 95%;
         border: none;
         border-top: 1px solid lightgray
      }

@media screen and (max-width: 800px) {
   header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      box-sizing: border-box;
      align-items: center;
      width: 100vw;
      max-width: 100vw;
      min-width: 0;
      gap: 5px;
      padding: 9px 10px;
   }

   header > .divLogo {
      flex: 1 1 auto;
      justify-content: flex-start;
      min-width: 0;
      padding: 2px;
   }

   header > .divLogo img {
      flex: 0 0 auto;
      width: 38px;
      height: 38px;
   }

   header > .divLogo > div {
      display: none;
   }

   #geoo {
      font-size: 20pt;
   }

   #online {
      display: none;
   }

   header > .divRow {
      flex: 0 0 auto;
      gap: 3px;
      min-width: 0;
      max-width: 100%;
      justify-self: end;
   }

   #selectIdioma {
      width: 32px;
      min-width: 32px;
      padding: 2px;
   }

   #meusPedidos {
      min-width: 42px;
      padding: 3px;
      font-size: 11pt;
      font-weight: 600;
   }

   #meusPedidos span:first-child {
      display: none;
   }

   #carrinhoContainer {
      min-width: 42px;
      padding: 3px;
   }

   #totalProdutos {
      top: -5px;
      left: 50%;
      right: auto;
      transform: translateX(-50%);
      min-width: 18px;
      height: 18px;
      margin-left: 0;
      border: 2px solid #4389ba;
      border-radius: 999px;
      padding: 0 4px;
      color: #28658f;
      background: white;
      font-size: 8pt;
      font-weight: 800;
      line-height: 14px;
      text-align: center;
      box-sizing: border-box;
      z-index: 1;
   }

   #carrinhoContainer img {
      width: 34px;
      height: 34px;
   }

   #atalhoAdm {
      min-width: 40px;
      padding: 2px;
      font-size: 8pt;
   }

   #atalhoAdm img {
      width: 22px;
      height: 22px;
   }

   #divImgProfile {
      flex: 0 0 40px;
      min-width: 40px;
   }

   #imgProfile {
      width: 38px;
      height: 38px;
      object-fit: contain;
   }

   #divListMenu {
      max-width: calc(100vw - 20px);
   }
}

@media screen and (max-width: 420px) {
   header > .divLogo {
      display: flex;
      flex: 0 0 42px;
      width: 42px;
   }

   header {
      grid-template-columns: 42px minmax(0, 1fr);
   }

   #meusPedidos {
      min-width: 38px;
   }

   #meusPedidos span {
      font-size: 11pt;
   }
}

/* Identidade visual compartilhada com o menu principal do GEOO. */
:root{
   --menu-store-cor: #4389ba;
   --menu-store-cor-escura: #28658f;
   --menu-store-sombra: 0 10px 28px rgba(23, 73, 108, .24);
}

header{
   position: relative;
   isolation: isolate;
   z-index: 1000;
   align-items: center;
   min-height: 86px;
   box-sizing: border-box;
   padding: 11px clamp(14px, 2.4vw, 38px);
   border-bottom: 4px solid rgba(255,255,255,.22);
   background: linear-gradient(120deg, var(--menu-store-cor-escura) 0%, var(--menu-store-cor) 52%, #559aca 100%);
   box-shadow: 0 5px 18px rgba(20,60,88,.25);
}

header::before{
   content: "";
   position: absolute;
   inset: 0;
   z-index: -1;
   pointer-events: none;
   opacity: .16;
   background-image:
      linear-gradient(30deg, transparent 47%, rgba(255,255,255,.35) 48%, rgba(255,255,255,.35) 50%, transparent 51%),
      linear-gradient(150deg, transparent 47%, rgba(255,255,255,.22) 48%, rgba(255,255,255,.22) 50%, transparent 51%);
   background-size: 88px 52px;
}

header > *{
   max-height: none;
}

header > .divLogo{
   flex: 0 0 auto;
   gap: 11px;
   min-height: 58px;
   box-sizing: border-box;
   border: 1px solid rgba(255,255,255,.2);
   border-radius: 14px;
   padding: 7px 11px 7px 8px;
   background: rgba(17,68,103,.2);
   box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
   transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

header > .divLogo:hover,
header > .divLogo:focus-visible{
   border-color: rgba(255,255,255,.5);
   background: rgba(17,68,103,.32);
   outline: none;
   transform: translateY(-1px);
}

header > .divLogo img{
   width: 42px;
   height: 42px;
   object-fit: contain;
   border-radius: 10px;
   padding: 4px;
   background: white;
   box-shadow: 0 5px 14px rgba(17,61,91,.2);
}

#geoo,
#online{
   color: white;
   font-family: 'Press Start 2P', cursive;
   font-weight: bold;
}

#geoo{ font-size: clamp(.78rem, .9vw, .98rem); }
#online{ font-size: clamp(.6rem, .7vw, .78rem); }

header > .divRow{
   gap: 9px;
}

.btnRec{
   min-height: 44px;
   box-sizing: border-box;
   border: 1px solid rgba(255,255,255,.36);
   border-radius: 12px;
   padding: 6px 10px;
   background: rgba(17,68,103,.16);
   transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.btnRec:hover,
.btnRec:focus-visible{
   border-color: rgba(255,255,255,.72);
   background: rgba(255,255,255,.14);
   outline: none;
   transform: translateY(-1px);
}

#meusPedidos{
   min-width: 76px;
   gap: 0;
   font-weight: bold;
   line-height: 1.05;
}

#carrinhoContainer{
   min-width: 52px;
   padding: 5px 8px;
}

#carrinhoContainer img{
   display: block;
   width: 34px;
   height: 34px;
   object-fit: contain;
}

#totalProdutos{
   top: -7px;
   left: 50%;
   right: auto;
   min-width: 19px;
   height: 19px;
   margin: 0;
   border: 2px solid var(--menu-store-cor);
   border-radius: 999px;
   padding: 0 4px;
   color: var(--menu-store-cor-escura);
   background: white;
   font-size: .7rem;
   font-weight: 800;
   line-height: 15px;
   text-align: center;
   transform: translateX(-50%);
   box-sizing: border-box;
}

#selectIdioma{
   appearance: none;
   min-width: 52px;
   min-height: 44px;
   box-sizing: border-box;
   cursor: pointer;
   border: 1px solid rgba(255,255,255,.36);
   border-radius: 10px;
   padding: 8px 22px 8px 9px;
   color: white;
   background-color: rgba(17,68,103,.16);
   background-image: linear-gradient(45deg, transparent 50%, white 50%), linear-gradient(135deg, white 50%, transparent 50%);
   background-position: calc(100% - 12px) 18px, calc(100% - 8px) 18px;
   background-size: 4px 4px;
   background-repeat: no-repeat;
   font-weight: bold;
}

#selectIdioma option{
   color: #3f3032;
   background: white;
}

#divImgProfile{
   flex: 0 0 44px;
}

#imgProfile{
   display: block;
   width: 44px;
   height: 44px;
   box-sizing: border-box;
   object-fit: contain;
   border: 1px solid rgba(255,255,255,.58);
   border-radius: 12px;
   padding: 2px;
   background: white;
}

#imgProfile.perfilPadrao{
   padding: 6px;
   background: rgba(17,68,103,.28);
}

#divListMenu{
   top: calc(100% - 1px);
   right: 0;
   min-width: 220px;
   max-height: min(70vh, 520px);
   overflow-y: auto;
   border: 1px solid #d5e4ee;
   border-radius: 14px;
   padding: 7px;
   background: white;
   box-shadow: var(--menu-store-sombra);
}

#divListMenu > a{
   align-items: center;
   gap: 10px;
   min-height: 42px;
   box-sizing: border-box;
   border-radius: 9px;
   padding: 8px 12px;
   color: #344b5b;
   font-size: 1rem;
}

#divListMenu > a img{
   width: 20px;
   height: 20px;
}

#divListMenu > a:hover,
#divListMenu > a:focus-visible{
   color: var(--menu-store-cor-escura);
   background: #edf6fb;
   outline: none;
}

@media screen and (max-width: 800px){
   header{
      min-height: 72px;
      padding: 9px 10px;
   }

   header > .divLogo{
      min-height: 48px;
      padding: 4px;
   }

   header > .divLogo img,
   #imgProfile{
      width: 40px;
      height: 40px;
   }

   #selectIdioma{
      min-width: 45px;
      min-height: 40px;
      padding: 8px 20px 8px 8px;
      background-position: calc(100% - 11px) 16px, calc(100% - 7px) 16px;
   }

   #meusPedidos{
      min-width: 68px;
      min-height: 40px;
      font-size: 11pt;
   }

   #carrinhoContainer{
      min-width: 44px;
      min-height: 40px;
      padding: 3px 5px;
   }
}

@media screen and (max-width: 420px){
   header{
      grid-template-columns: 42px minmax(0, 1fr);
   }

   header > .divLogo{
      display: flex;
      width: 42px;
      min-height: 42px;
   }

   header > .divLogo img{
      width: 38px;
      height: 38px;
   }

   header > .divLogo > div{
      display: none;
   }

   header > .divRow{
      gap: 4px;
   }
}
