

@font-face {
  font-family: "ALTRiviera";
  src:
    url("/wp-content/themes/track_your_thoughts/assets/font/ALTRiviera-Medium.woff") format("woff");
  font-weight: 500;        /* Medium */
  font-style: normal;
  font-display: swap;      /* evita FOIT */
}








/* Layout a pagina intera */
html, body {
  height: 100%;
  font-family: "ALTRiviera";
  font-weight: 500;
  font-size: 62.5%;
  margin-top: 0px !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: 100svh;        /* viewport height "safe" per mobile */
  overflow: auto;          /* niente scroll su body, scorre solo la lista */
}

/* Header e Footer */
header {
  flex: 0 0 auto;
  height: 5rem;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

footer {
  flex: 0 0 auto;
  height: 5rem;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}


.tyt-hero {
  flex: 1 1 auto;        /* è questo che si espande tra header e input */
  min-height: 0;         /* IMPORTANTISSIMO per permettere lo shrink */
  overflow: auto;
  padding: 4rem 14rem 14rem 14rem;
  display: flex;
  flex-direction: column;
  position: relative;
}


.tyt-hero #thought-list {
  flex: 1 1 auto;
}

.thought-keyword {
  font-size: 1.9rem;
  color: black;
  -webkit-text-stroke: 0;
  margin-left: 3px;
  position: relative;
  top: -2.6rem;
  display: inline-block;
}

span.logo {
  font-weight: 700;
}



/* Area input: sempre visibile in basso sopra al footer */
.tyt-input {
  flex: 0 0 auto;
  background: #fff;
  padding: 1.6rem 0 2rem;
}

/* Form */
#thought-form {
  display: flex;
  gap: 0rem;
  flex-direction: column;
  height: calc(50vh - 7rem);
}
#thought-input,
#keyword-input {
  border: none;
  outline: none;
  width: -webkit-fill-available;
  font-size: 7.2rem;
  font-family: 'ALTRiviera';
  display: none;
  min-height: 7.2rem;   /* dipende dal font-size */
  max-height: calc(7.2rem * 6); /* limite massimo: 6 righe */
  line-height: 7.2rem;
  overflow:hidden;
  resize:none;
}

#thought-input::placeholder,
#keyword-input::placeholder {
  color: #7C7C7C;
}




#thought-form button {
  padding: 1.4rem 1.8rem;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: .6rem;
  cursor: pointer;
}
#thought-form.is-sending button { 
  opacity: .7; 
  pointer-events: none; 
}

.form_question {
  font-size: 7.2rem;
  line-height: 7rem;
  text-decoration: underline;
  cursor: pointer;
}

.form_cta {
  color: #7C7C7C;
  font-size: 7.2rem;
  line-height: 7rem;
  display: none;
  transform: translateY(-7px);
}



/* Pensieri */
.thought {
  font-size: 7.2rem;
  line-height: 7rem;
  /*margin: 0 0 .2rem 0;*/
  margin: 0px;
  word-break: break-word;
}
.thought.negative { 
  color: #000; 
}
.thought.positive, #tyt-pos-pct {
  color: transparent;
  -webkit-text-stroke: 1px #000;
}
.thought.empty { 
  font-size: 1.8rem; 
  color: #666; 
  -webkit-text-stroke: 0; 
  text-shadow: none; 
}

/* Accessibilità */
.sr-only { 
  position: absolute; 
  width: 1px; 
  height: 1px; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0 0 0 0); 
  border: 0; 
}

.thought-line {
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  flex-direction: row;
}


.thought-line.just-added { animation: tytHL 1.2s ease-out; }
@keyframes tytHL { 0%{background:rgba(0,0,0,.06)} 100%{background:transparent} }




/* Autocomplete keyword */
.tyt-kw-wrap { position: relative; display: block; }

.tyt-kw-suggest {
  position: absolute;
  top: 0;
  transform: translate(0, -100%);
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .8rem;
  box-shadow: 0 1rem 1.5rem -.3rem rgba(0,0,0,.1), 0 .4rem .6rem -.4rem rgba(0,0,0,.1);
  max-height: 24rem;
  overflow-y: auto;
  width: fit-content;
}
.tyt-kw-suggest.hidden { display: none; }

.tyt-kw-item {
  padding: .8rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2rem;
  line-height: 2.7rem;
}
.tyt-kw-item:hover,
.tyt-kw-item.active { background: #f3f4f6; }

.tyt-stats {
  position: fixed;
  bottom: 0;
  height: 9rem;
  width: 100%;
  display: flex;
  align-items: center;
  z-index: 10;
  background-color: white;
}


.tyt-stats-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
  padding: 0px 14rem;
}


.tyt-stats-row div{
  font-size: 3.2rem;
  position: relative;
  width: 25%;
  text-align: center;
}

.tyt-stats-row div:first-child{
  text-align: left;
}


.tyt-stats-row div:last-child{
  text-align: right;
}


.tyt-stats-row .logo + .element_info {
  font-size: 7.2rem;
  line-height: 7rem;
  position: absolute;
  top: 0rem;
  left: -9999999rem;
  width: max-content;
  text-align: left;
  transform: translateY(calc(-100% - 3rem));
  opacity: 0;
  transition: opacity .3s;
}

.tyt-stats-row > div:first-child:hover > span + .element_info {
  left: 0;
  opacity: 1;
}

.tyt-stats-row > div:first-child:hover > span:first-of-type {
  opacity: .2;
}



.tyt-stats-row .search_cont {
  display: none;
}

#input_search {
  font-size: 3.2rem;
  line-height: 3.2rem;
  border:none;
  outline: none;
  margin-top: -5px;
  padding: 0px !important;
  font-family: "ALTRiviera";
  width: -webkit-fill-available;
}

.search_active {
  text-decoration: underline;
}

.t_preview {
  display: none;
}

.research_option {
  font-size: 7.2rem;
  line-height: 7rem;
  margin: 0px;
  height: 47vh;
}

.research_option span {
  text-decoration: underline;
  cursor: pointer;
}



/* === Effetto positivizzazione:  === */







body .bottom_hover {
  height: 0px;
  width: 100%;
  background: transparent linear-gradient(180deg, #FFFFFF00 0%, #FFFFFFC6 51%, #FFFFFF 100%) 0% 0% no-repeat padding-box;
  position: fixed;
  bottom:9rem;
  z-index: 9;
  opacity: 0;
  transition: opacity .2s;
}

body:has(.tyt-stats-row > div:first-child:hover) .bottom_hover {
  opacity: 1;
  height: 50%;
}














/* Responsive */
@media (max-width: 800px) {

  html {
    font-size: 50%;
  }

  #thought-form { 
    grid-template-columns: 1fr;
    height: 57vh; 
  }


  .tyt-hero {
    padding: 4rem 20px 0px 20px;
    
  }
  

  .thought, .form_question, .form_cta {
    font-size: 42px;
    line-height: 42px;
    transform: translateY(0px);
  }

  .thought-keyword {
    font-size: 11px;
    display: inline;
    top: -2rem;
  }

  .tyt-stats-row > div:first-child {
    display:none;
  }

  .tyt-stats-row div {
    font-size: 16px;
    line-height: 16px;
    width: fit-content;
  }

  .tyt-stats-row > div:nth-child(2) {
    text-align: left;
  }

  .tyt-stats-row > div:last-child {
    width: 33%;
  }

  #input_search {
    font-size: 16px;
    line-height: 16px;
    width: -webkit-fill-available;
  }

  #thought-form {
    margin-bottom: 0px;
  }

  .tyt-stats-row {
    padding: 0px 20px;
  }




  .research_option {
    font-size: 34px;
    line-height: 36px;
    height: 55vh;
  }



  #thought-input, #keyword-input {
    font-size: 42px;
    line-height: 42px;
    padding: 0px;
    min-height: 42px;   /* dipende dal font-size */
    max-height: calc(42px * 6); /* limite massimo: 6 righe */
    line-height: 42px;
  }




}
