/*
 #dc8add: morat clar (lletra actual)
 #333333: quadrat negre
 #e7e7e7: gris grid
 #450359: morat oscur
*/

/* GENERAL */
html, body {
  height: 100%;   
  font-family: "Arial", sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column; 
}

.main-content {
  flex: 1; 
}

.merriweather-regular {
	font-family: "Merriweather", sans-serif;
	font-weight: 400;
	font-style: normal;
}

/* FOOTER */
.footer {
  background-color: #450359;
  color: #fff;
  text-align: center; 
  padding: 8px 0;
  font-size: 14px;
}

/* BOTONS */
.btn-crossword{
  background-color:#450359;
  border: 2px solid #450359;
  color: #fff;
  border-radius: 0;
  font-size: 1.1rem;
  transition: all 0.2 ease-in-out;
}

.btn-crossword.active,
.btn-crossword:hover{
  background-color: #dc8add;
  border-color: #450359;
  color: #450359;
}

.btn-crossword-outline{
  background-color: transparent;
  border: 1px solid #450359;
  color: #450359;
  border-radius: 0;
  font-size: 1rem;
  transition: all 0.2 ease-in-out;
}

.btn-crossword-outline:hover{
  background-color: #dc8add;
  border-color: #450359;
  color: #450359;
}

.btn-crossword-modal{
  background-color:#450359;
  border: 1px solid #450359;
  color: #fff;
  border-radius: 0;
  font-size: 1rem;
  transition: all 0.2 ease-in-out;
}
.btn-crossword-modal:hover{
  background-color: #dc8add;
  border-color: #450359;
  color: #450359;
}

.btn-crossword-modal:active,
.btn-crossword:active,
.btn-crossword-outline:active{
  transform: scale(0.97)
}

/* TITOL */
.titolDivertit {
  width: 100%;          
  max-width: 800px;       
  border: 1px solid #333;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 20px; 
}

.titolDivertit svg {
  width: 100%;
  height: auto;
  aspect-ratio: 14 / 1;   
}

#square{
    cursor:pointer;
}

.letter{
  stroke: #333333;
  fill: transparent;
  transition: fill 0.3s;
  stroke-width: 2;
  min-height: 50px;
}
g:hover rect.letter{
  fill: #dc8add;
}

/* LLISTA CREUATS */
#puzzleSelect{
  display: block;
}

.puzDiv{
  border-top: 1px solid #949494;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: #fff;
  min-height: 104px;
}
.puzDiv:hover{
  background-color: #e6e6e6;
}

.puzLeft{
  display: flex;
  flex-direction: row;  
  align-items: center;
}
.puzRight{
  display: flex;
  flex-direction: row;  
  align-items: center;
}
.puzRightLabel{
    display: flex;
    flex-direction: column;  
    align-items: center;
    font-size: 0.8em;

}


.puzIcon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 20px;
}

.puzArrow{
  font-size: 2.5rem;
  color: #333333;
  margin-left: 10px;
  margin-bottom: 6px;
}

.pDate {
  color: #000000;
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 0;
}

.spTitleAuthor{
  font-style: italic;
  color: #333333;
}

.progress-ring{
  --p: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;

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

.progress-ring.guai{
  background: 
    radial-gradient(closest-side, white 70%, transparent 80% 100%),
    conic-gradient(#BCFF1F calc(var(--p) * 1%), #c7c7c7 0); 
}
.progress-ring.regu{
  background: 
    radial-gradient(closest-side, white 70%, transparent 80% 100%),
    conic-gradient(#FFD21F  calc(var(--p) * 1%), #c7c7c7 0); 
}
.progress-ring::before{
  content: var(--percentatge);
  color: rgb(68, 68, 68);
}



/* GRID */
#board{
  display: none;  
  max-height: 500px;
}

#grid{
 display: grid;
 width: 100%;
 aspect-ratio: 1/1;
 max-width: 500px;
}

#title{
  font-size: 0.9rem;
}

.cell{
  border-bottom: 1px solid #5b5b5b;
  border-right: 1px solid #5b5b5b;
  width: 100%;
  aspect-ratio: 1/1;
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: last baseline;
  outline: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.firstRow{ border-top: 1px solid #5b5b5b; }
.firstCol{ border-left: 1px solid #5b5b5b; }
.cellBlack{ background-color: #333; }

.nPista{
  position: absolute;
  top: -1px;
  left: 2px;  
}
/* .nPistaMini{ font-size: 0.8em; } */
.nPistaBig { font-size: 0.6rem; }

.current-cell{
  background-color: #dc8add;
}

.highlight-cell {
  background-color: #e7e7e7;
}
.cellLetterMini{
  font-size: 2rem;
  text-align: center;
  border: none; 
  background: transparent;
  position: absolute;
  /* opacity: 0;
  z-index: -1; */
}
.cellLetterBig{
  font-size: 1rem;
}

.correct{ color:green;}
.incorrect{color:red;}

/* NAVBAR PUZZLE */

.barra-pista{
  background-color: #e7e7e7;
  min-height:48px;
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 1;
}

.arrow-banner{
  border: none;
  background-color: transparent;
}

@media(max-width: 576px){
  .barra-pista{
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
  }
  .arrow-banner{
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #banner-clue-text {
  flex: 1;
  text-align: center;
  word-break: break-word; 
  white-space: normal;
}
.nPistaBig { font-size: 0.4rem; }

.cellLetterBig{
  font-size: 0.9rem;
}
}

#timer{
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Panel pistes */
.clueDiv{
  display: flex;
  align-items: flex-start;
  font-size: 0.9rem;  
}
.clueDiv.active{
  background-color: #f2c2f3;
}
.clueNum{
  display: inline-block;
  text-align: right;
  margin-right: 10px;
  font-weight: bold;
  width: 1.8em;
}
.clueText{
  flex: 1
}

hr{
  margin-top: 2px;
  margin-bottom: 10px;
  max-width: 230px;
}

.clue-list{
  max-height: 500px;
  overflow-y:auto;
}

/*  Teclat */
.teclat{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f8f9fa;
  border-top: 2px solid #ccc;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 999;
}

.teclat .teclat-row{
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.teclat button{
  flex: 1;
  min-width: 2rem;
  padding: 0.5rem;
  font-size: 1.2rem;
  border: 1px solid #aaa;
  border-radius: 5px;
  background-color: #fff;
}

@media (min-width: 768px){
  #teclat{
    display: none !important;
  }
}

/* paginació */
/* .pagination-container {
  display: flex;
  align-items: end;
  justify-content: end;
} */
.pagination-number,
.pagination-button{
  font-size: 1.1rem;
  background-color: #fff;
  color: #450359;
  border: 1px solid #450359;
  margin: 0.1rem 0.1rem;
  cursor: pointer;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: none;
}

.pagination-number:hover,
.pagination-button:not(.disabled):hover {
  background: #dc8add;
  color: #450359;
}

.pagination-number.active {
  color: #450359;
  background: #dc8add;
}