/* Make content area fill the entire browser window */
html,
.fullscreen {

  height: 100%;
  min-height: 100%;
  overflow: hidden;

  width: 100%;

  margin: 0;
  padding: 0;
  font-size: 62.5%;
}



body {

  /*font-family: 'RobotoRegular', 'Droid Sans', sans-serif;*/
  font-size: 12rem;

  min-width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  margin: 0;
}




/* Center the content in the browser window */
.container {

  margin: auto;
  font-size: 1.3rem;
}



/*------------------------------------------------------ COMUNI ----------------------------------*/


#header {
  flex: 0 0 auto;

  display: flex;
  justify-content: space-between;
  width: 100%;
}

#header .titolo {

  flex-grow: 5;

  text-align: center;
  margin: 2px;
  font-size: 1.5rem;
  font-weight: bold;
}




#center {

  flex: 1 1 auto;
  overflow-y: auto;

  position: relative;
  z-index: 1;

  width: 100%;
  min-height: 40%
}




#footer {

  position: relative;
  z-index: 2;

  flex: 0 1 auto;

  width: 100%;
}




#button_bar {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  padding-right: 2px;
}



#button_bar img {
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  padding: 4px;
  object-fit: contain;
  background: linear-gradient(#e7c978, #bb8437);
  border: 2px solid #57351b;
  border-radius: 8px;
  box-shadow: 0 2px 0 #3a2212, inset 0 0 0 1px rgba(255, 239, 176, 0.55);
  cursor: pointer;
}

.treasure_celebration {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2200;
  box-sizing: border-box;
  width: min(92vw, 520px);
  min-height: 72px;
  padding: 12px 54px 12px 72px;
  transform: translateX(-50%);
  color: #3a2212;
  background: #f2d58a url('/images/forziere.png') no-repeat 10px center / 52px 52px;
  border: 3px solid #7a4a1f;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(35, 18, 5, 0.45), inset 0 0 0 2px rgba(255, 242, 181, 0.7);
  animation: treasure-celebration-in 320ms ease-out;
}

.treasure_celebration strong,
.treasure_celebration span {
  display: block;
}

.treasure_celebration strong {
  font-size: 1.6rem;
  line-height: 1;
}

.treasure_celebration span {
  margin-top: 4px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.treasure_celebration button {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  color: #3a2212;
  background: rgba(255, 246, 203, 0.82);
  border: 2px solid #7a4a1f;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 2rem;
  cursor: pointer;
}

@keyframes treasure-celebration-in {
  from { opacity: 0; transform: translate(-50%, -18px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .treasure_celebration { animation: none; }
}



#timer {
  font-family: Courier New, Courier, Lucida Sans Typewriter, Lucida Typewriter, monospace;
  font-weight: bold;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-align: center;
  color: #f8e7ad;
  box-sizing: border-box;
  min-width: 76px;
  height: 44px;
  padding: 10px 8px 8px;
  margin: 1px 3px 1px 2px;
  background:
    radial-gradient(circle at 8px 8px, #f6d37a 0 1px, transparent 2px),
    radial-gradient(circle at calc(100% - 8px) 8px, #f6d37a 0 1px, transparent 2px),
    linear-gradient(180deg, #70451f 0%, #3b2413 52%, #25160d 100%);
  border: 2px solid #c89a3b;
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 223, 132, 0.22),
    inset 0 -3px 5px rgba(0, 0, 0, 0.42),
    0 2px 0 #3a2212;
  text-shadow: 0 1px 0 #1a0f08;
  align-self: center;
}




#linguette {

  position: absolute;
  top: -50px;
  right: 2px;
  width: max-content;
  height: 46px;
  margin: 0;
  padding: 0;
  z-index: 10;

  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: flex-end;
  gap: 3px;
}


#lin_fumetto {
  order: 1;
  margin: 1px 0;
}

#lin_userbar {
  order: 2;
  margin: 1px 0;
}

#lin_chat_log {
  order: 3;
  margin: 1px 0;
}




#linguette .linguetta {

  width: 44px;
  height: 44px;
  box-sizing: border-box;
  padding: 4px;

  object-fit: contain;
  background: linear-gradient(#e7c978, #bb8437);
  border: 2px solid #57351b;
  border-radius: 8px;
  box-shadow: 0 2px 0 #3a2212, inset 0 0 0 1px rgba(255, 239, 176, 0.55);
  cursor: pointer;
}


#linguette .attiva {
  border-color: #d7ad48 !important;
  box-shadow: 0 0 0 2px #57351b, 0 2px 0 #3a2212;
}


#linguette .non_letti {
  outline: 3px solid #a82d20;
  outline-offset: 1px;
  animation: pulsate 0.6s ease-out infinite;
  /* Imposta l'animazione per il lampeggiamento */

}


@keyframes pulsate {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}




/*-----------------------------------------------------------------------------*/

/* la nuova icona per aprire il dialog della nuova chat */

#chat_icon {

  position: relative;
  width: 50px;
  height: 50px;
  background-image: url('/images/icona-scrivi-messaggio.png');
  background-position: 0 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}



/* il chat dialog */

.dl_chat {
  box-sizing: border-box;
  width: min(92vw, 560px);
  max-height: min(90dvh, 720px);
  display: flex;
  flex-direction: column;
  gap: .8rem;
  overflow-y: auto;
}

.dl_chat::backdrop {
  background: rgba(20, 12, 7, .68);
  backdrop-filter: blur(2px);
}

.chat_dialog_header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: .7rem;
  text-align: left;
}

.chat_dialog_header h2,
.chat_dialog_header p { margin: 0; }
.chat_dialog_header h2 { font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1; }
.chat_dialog_header p { grid-column: 1 / -1; padding-top: .35rem; font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.chat_dialog_emblema { font-size: 2rem; }

.chat_dialog_field {
  display: grid;
  gap: .3rem;
}

.dl_chat label { font-size: 1.25rem; font-weight: bold; }

.dl_chat .testo,
.dl_chat .destinatari {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border: 2px solid #76502e;
  border-radius: 8px;
  padding: .7rem .8rem;
  color: #2f1b0e;
  background: rgba(255, 249, 222, .82);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1.25;
  min-width: 0;
}

.dl_chat .testo { min-height: 7rem; resize: vertical; }
.dl_chat .testo:focus-visible,
.dl_chat .destinatari:focus-visible { outline: 3px solid #b67a27; outline-offset: 2px; }
.chat_dialog_note { min-height: 2.5em; margin: 0; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.chat_dialog_note.errore { color: #7d1c18; font-weight: bold; }
.chat_dialog_actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: .65rem; }

.dl_chat .bt_send,
.dl_chat .bt_close {
  min-height: 48px;
  min-width: 8rem;
  margin: 0;
  border: 2px solid #563318;
  border-radius: 8px;
  padding: .65rem 1rem;
  font: inherit;
  font-size: 1.25rem;
  font-weight: bold;
  flex: 1 1 0;
}

.dl_chat .bt_send { color: #29170b; background: linear-gradient(#f0d47b, #bd8737); }
.dl_chat .bt_send:disabled { opacity: .65; cursor: wait; }
.dl_chat .bt_close { color: #f8e8bf; background: #4b3020; }




/*-----------------------------------------------------------------------------*/


#chat {

  position: relative;
  border-top: 2px solid #765638;
  width: 100%;
  height: clamp(150px, 25dvh, 230px);
  max-height: 30dvh;
  box-sizing: border-box;
  overflow: hidden;
  color: #30291f;
  background-color: #e8d9ad;
  background-image:
    linear-gradient(90deg, transparent 31px, rgba(154, 67, 56, 0.38) 32px, transparent 33px),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(69, 104, 117, 0.25) 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(69, 104, 117, 0.25) 20px),
    radial-gradient(circle at 18% 22%, rgba(116, 79, 39, 0.12), transparent 38%),
    radial-gradient(circle at 82% 74%, rgba(92, 59, 28, 0.1), transparent 42%);

}

#chat_log {
  height: 100%;
  box-sizing: border-box;
  padding: 8px 8px 12px 38px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#chat .frase {

  padding: 5px 4px 7px;
  margin: 0 0 5px;
  font-size: 1.4rem;
  line-height: 1.25;
  border-bottom: 1px dashed rgba(83, 58, 34, 0.42);
}


#chat .frase .ora {

  font-size: 0.76em;
  font-weight: normal;
  padding: 2px 5px 2px 0;
  color: #765638;
}

#chat .frase .from {

  font-weight: bold;
  padding: 2px;
  color: #69452c;
}

#chat .frase .from:after {

  content: " > ";
  position: relative;
}

#chat .frase .dest {

  font-weight: normal;
  padding: 2px;
  color: #765638;
}

#chat .frase .testo {

  font-weight: bold;
  padding: 4px 6px;
  margin: 2px 0 0;
  border-left: 2px solid rgba(93, 66, 38, 0.48);
  border-radius: 2px;
  overflow-wrap: anywhere;
}


#chat .frase .image {

  width: 20px;
  height: 20px;
  padding: 2px;
}

#chat .frase .mini {

  width: 18px;
  height: 18px;
  padding: 5px;
}







#user_bar {

  position: relative;
  width: 100%;
  height: auto;
  max-height: 30dvh;
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: rgba(255, 255, 255, 0.96);
}

/* ----------------------- sezioni userbar -----------*/

.userbar_wallet {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border-top: 1px solid lightgray;
  border-bottom: 1px solid lightgray;
  background: #f5e9ce;
  box-sizing: border-box;
  overflow: hidden;
}

.userbar_panel {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  padding: 4px 6px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 6px;
  overflow: visible;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.userbar_panel + .userbar_panel {
  border-top: 1px solid lightgray;
}

.userbar_panel.vuoto {
  flex: 0 0 28px;
  padding: 0 6px;
  overflow: hidden;
}

.userbar_panel > .testo {
  flex: 0 0 auto;
  margin: 0;
  font-weight: bold;
}

.userbar_wallet > .testo {
  flex: 0 0 auto;
  margin: 0;
  font-weight: bold;
}

.coin_stack {
  position: relative;
  display: inline-block;
  height: 36px;
  min-width: 0;
  max-width: 230px;
  flex: 0 0 auto;
}

.coin_item {
  position: absolute;
  left: var(--coin-left, 0);
  top: 1px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.coin_item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/*-------------------------- oggetti in bag ---------------------*/


.oggetto_bag {

  position: relative;
  /* serve per div figlie */
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
}


.oggetto_bag .moneta {

  width: 20px;
  height: 20px;
}

/*

.tool_bag {

  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;*

  background-repeat: no-repeat;
  background-size: 45px 45px;
}


.tool_bag .moneta {

  width: 20px;
  height: 20px;
}


.coin_bag {

  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;

  background-repeat: no-repeat;
  background-size: 45px 45px;
}

.hint_bag {

  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;

  background-repeat: no-repeat;
  background-size: 45px 45px;
}

.hint_bag .moneta {

  width: 20px;
  height: 20px;
}
*/


.in_uso {
  border: 2px solid red !important;
  background-color: white;
}

/*
.disabilitato {
  opacity:0.25;
  cursor:not-allowed;
}
*/



/*-------------------------- oggetti in mappa ---------------------*/

/* comuni agli oggetti mappa*/
.mapobj {

  position: absolute;
/*  border-radius: 25%;
  background-color: white;
  box-shadow: 2px 2px lightgray; */
}


/* classi specializzate per tipi oggetto
.coin_map {

 }


.hint_map {

}


.tool_map {

}


.trouble_map {

}

*/


/*------------------------ messaggio -----------------------*/

.master_help_feedback {
  min-height: 1.5em;
  margin: .6rem 0;
  color: #7d1c18;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
}

.master_help_offer .bottoni button:disabled {
  cursor: wait;
  opacity: .55;
}



.dl_messaggio {


  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;

  height: 95%;
  width: 95%;

  font-size: 1.8rem;
  background-color: ivory;
}



.dl_messaggio .titolo {

  flex: 1 1 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;

  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}


.dl_messaggio .testo {

  flex: 2 1 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;

  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}


.dl_messaggio .image {

  height: 10vmin;
  max-width: 95%;
  object-fit: contain;

  flex: 5 1 auto;

  margin: 0 auto;
  padding: 2%;

}

.dl_messaggio .bottoni {

  flex: 1 1 auto;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  align-content: center;
}


.dl_messaggio .bottone_no {

  font-size: 1.6rem;

  background-color: white;
  border-radius: 10px;
  padding: 5px 10px;
  margin: 2px;
}

.dl_messaggio .bottone_si {

  font-size: 1.6rem;

  background-color: white;
  border-radius: 10px;
  padding: 5px 10px;
  margin: 2px;
}




/*------------------------ notifica -----------------------*/


.dl_notifica {

  position: absolute;
  top: 50px;

  font-size: 1.6rem;
  line-height: 1.25;
  border: 1px solid lightgray;
  border-radius: 2px;
  width: 96%;
  left: 2%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  background-color: white;

  padding: 0;
  margin: 0 auto;

  z-index: 300
}

.dl_notifica .titolo {

  font-weight: bold;
  padding: 0;
  margin: 2px;
}

.dl_notifica p {

  padding: 0;
  margin: 2px;
  text-align: center;
}


.dl_notifica .image {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  margin: 2px;
  float: left;
}

.dl_notifica .mini {

  width: 18px;
  height: 18px;
  padding-left: 5px;
  float: right;
}









/*------------------------------------------- MAPPA --------------------------------------------------------------*/


.map {

  height: 100%;
  width: 100%;
}

.player {

  /* border:2px solid white; */
  position: absolute;
  border-radius: 10px;
}




#_center_button {

  position: absolute;
  left: 5px;
  bottom: 5px;

  width: 30px;
  height: 30px;
  z-index: 210;

  background-image: url('/images/ricentra-mappa-pirata-v1.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}



#_simulation_button {

  position: absolute;
  left: 35px;
  bottom: 5px;

  width: 30px;
  height: 30px;
  z-index: 210;

  background-image: url('/images/gps.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}


#_bottoni_zoom {

  position: absolute;
  left: 5px;
  top: 5px;
  display: flex;
  flex-direction: column;

  padding: 0;
  margin: 0;
  z-index: 210;
}

#_button_zoomin {

  width: 30px;
  height: 30px;

  background-image: url('/images/zoom-in-pirata-v1.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

#_button_zoomout {

  width: 30px;
  height: 30px;

  background-image: url('/images/zoom-out-pirata-v1.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}



#_cielo {

  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  opacity: 0.6;
  background-color: black;
}




/* classi usate dai vari tool, trouble, hint ecc. Dovrebbero essere caricate dinamicamente dalle classi che le usano */



.radar {

  position: absolute;
  width: 40px;
  height: 40px;
  top: -20px;
  left: -20px;
  border-radius: 20px;
  opacity: 0.6;
  border-style: solid;
  border-width: 1px;
}




.sticker {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.9;
  background-size: 100% 100%;
  z-index: 30;
}


.bandana {
  position: absolute;
  width: 135%;
  height: 100%;
  top: -8%;
  left: -30%;
  opacity: 1;
  background-size: 100% 100%;
  z-index: 25;
}



/*---------------------- roba del quiz -----------------*/

.domanda {

  text-align: center;
  font-size: 2.0rem;
  font-weight: bold;

  width: 90%;
  margin: 5%;
}

.domanda .quiz-image {
  display: block;
  width: 60%;
  max-width: 420px;
  max-height: 32vh;
  margin: 10px auto 18px;
  padding: 3px;
  box-sizing: border-box;
  object-fit: contain;
  background-color: #5a351a;
  border: 7px ridge #c79a43;
  border-radius: 6px;
  outline: 3px solid #4a2a13;
  box-shadow: 0 5px 10px rgba(35, 18, 6, 0.48), inset 0 0 0 1px #f0d486;
}

.domanda ul {
  text-align: center;
  padding-left: 0;
}

.domanda li {

  list-style-type: none;

  background-color: transparent;
  box-sizing: border-box;
  width: min(100%, 600px);
  min-height: 56px;
  margin: 4px auto 12px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 18px 28px;
  border-color: transparent;
  border-image-source: url('/temi/pirati/biglietto-responsive.png');
  border-image-slice: 90 145 90 145 fill;
  border-image-width: 18px 28px;
  border-image-repeat: stretch;
}


/*--------------------- roba dell' enigma impiccato -------------------*/

.impiccato-widget-container {
  position: absolute;
  z-index: 5;
  top: 6px;
  right: max(6px, env(safe-area-inset-right));
  display: flex;
  pointer-events: none;
}

.impiccato-widget {
  cursor: pointer;
  text-align: center;
  border: 1px solid #7a4b20;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(43, 22, 11, 0.28);
  touch-action: manipulation;
}

.impiccato-widget #forca {
  display: block;
  width: 34px;
  height: 37px;
  margin: 0 auto;
  object-fit: contain;
}

.impiccato-widget:focus-visible {
  outline: 3px solid #f4c95d;
  outline-offset: 3px;
}

.impiccato-istruzione {
  max-width: 130px;
  margin: 1px auto;
  padding: 2px;
  color: #2b160b;
  background: #f2d18a;
  border: 1px solid #9a652b;
  border-radius: 6px;
  font-size: clamp(1.12rem, 4.7vw, 1.32rem);
  font-weight: bold;
  line-height: 1.05;
  white-space: pre-line;
}

.lettera {

  font-size: 1rem;
  border: 0;
  width: 11px;
  padding: 0;
  margin: 0;
}



.dl_lettera {

  font-size: 1.4rem;
  border: 0;
  border-radius: 10px;
  width: 85%;
  background-color: ivory;
}

.dl_lettera .titolo {

  font-weight: bold;
}

.dl_lettera p {

  padding: 10px;
  text-align: center;
}


.dl_lettera .image {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  margin: 0 5px 0 5px;
  float: left;
}


.dl_lettera select {

  margin: 0 45% 10px 45%;
  font-size: 30px;
}


.dl_lettera .bottone_no {

  position: absolute;
  bottom: 5px;
  left: 5px;
  background-color: white;
  border-radius: 10px;
  padding: 5px 10px 5px 10px;
}

.dl_lettera .bottone_si {

  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: white;
  border-radius: 10px;
  padding: 5px 10px 5px 10px;
}



.progressBar {

  background-image: "url(/images/teschietto.png)" !important;
}

/*------------------------------------------------- prova svg ---------------*/

.svg-layer  {
  z-index:999999;
}


.svg-layer path:hover {
  opacity: 0.4;
}