/* assets/bingo.css */

/* --- Wrapper --- */


.giallo-bingo-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 700px;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #ffcc00;
  background: rgba(0, 0, 0, 0.55);
  color: #f1e7b6;
  font-family: 'Oswald', sans-serif;
  /* Verwijder deze → overflow: hidden; */
  overflow: visible;
  z-index: 1; /* zorgt dat content erboven blijft */
}


/* Achtergrondposter */
.giallo-bingo-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 0;
}


.giallo-bingo-header,
.giallo-bingo-grid,
.giallo-bingo-footer {
  position: relative;
  z-index: 1;
}

.giallo-bingo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) blur(4px);
  z-index: 0;
}
.giallo-bingo-wrapper > *:not(.giallo-bingo-bg) {
  position: relative;
  z-index: 1;
}




/* --- Header --- */
.giallo-bingo-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.giallo-bingo-title {
  font-size: 1.6rem;
  margin: 0;
  text-transform: uppercase;
  color: #ffd54a;
}

.giallo-bingo-controls {
  display: flex;
  gap: 0.5rem;
}

/* --- Buttons --- */
.giallo-btn {
  background: transparent;
  color: #ffcc00;
  border: 2px solid #ffcc00;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.giallo-btn:hover {
  background: #ffcc00;
  color: #000;
}

/* --- Grid --- */
/* --- Grid (vierkante cellen fix) --- */
.giallo-bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 600px; /* zorgt dat het binnen het kader blijft */
  margin: 0 auto;
}

.giallo-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

 font-size: clamp(0.5rem, 0.75vw, 0.75rem);
 line-height: 1.1;
  padding: 0.4rem;
  color: #fff6d1;

  border: 1px solid rgba(255, 240, 200, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);

  cursor: pointer;
  transition: all 0.15s ease;

  /* ✅ Belangrijk voor tekstwrapping */
  white-space: normal; 
  overflow-wrap: anywhere;
  word-break: break-word;

  /* Voorkom dat tekst verdwijnt */
  overflow: visible;
  text-overflow: unset;
}


.giallo-cell:hover {

  transform: scale(1.03);
  box-shadow: 0 0 8px rgba(255, 255, 100, 0.5), inset 0 0 4px rgba(255, 255, 150, 0.2);
}



.giallo-cell.checked {
  background: rgba(255, 220, 90, 0.9);
  color: #000;
  font-weight: bold;
  text-shadow: none;
}



/* --- Hover tekst onderaan --- */
.giallo-hover-text {
  min-height: 1.6rem;
  margin-top: 0.8rem;
  padding: 0.6rem 1rem;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 220, 100, 0.4);
  color: #ffdf57;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
  backdrop-filter: blur(3px);
  transition: opacity 0.2s ease;
  opacity: 0;
}

.giallo-hover-text.active {
  opacity: 1;
}



/* --- Footer & Progress --- */
.giallo-bingo-footer {
  margin-top: 0.5rem;
}

.giallo-progress {
  font-size: 0.9rem;
  color: #ffd54a;
}

/* --- Toast --- */
.giallo-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffcc00;
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  display: none;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  animation: fadeInOut 1.6s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  90% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}


/* Zorg dat elementen erna niet overlappen met de blur-achtergrond */
.giallo-bingo-wrapper::after {
  content: "";
  display: block;
  height: 0;
  clear: both;
}



/* --- Tooltip bij hover --- */
/* --- Tooltip bij hover --- */
.giallo-cell {
  position: relative;
}

/* Tooltip-styling */
.giallo-cell::after {
  content: attr(data-fulltext);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #ffdf57;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
  width: max-content;
  max-width: 240px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 230, 100, 0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  white-space: normal;
  text-shadow: none;
}

/* Klein pijltje onder tooltip */
.giallo-cell::before {
  content: "";
  position: absolute;
  bottom: 102%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 49;
}

/* Hover activeert tooltip */
.giallo-cell:hover::after,
.giallo-cell:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
}

/* Mobiel: tooltip onderaan */
@media (max-width: 700px) {
  .giallo-cell::after {
    bottom: auto;
    top: 110%;
  }
  .giallo-cell::before {
    bottom: auto;
    top: 102%;
    border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent;
  }
}

/* --- Buttons beter leesbaar --- */
.giallo-btn {
  background: rgba(0,0,0,0.65);
  border: 2px solid #ffdf57;
  color: #ffdf57;
  text-shadow: 0 0 6px #000;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.giallo-btn:hover {
  background: #ffdf57;
  color: #000;
  box-shadow: 0 0 8px #ffdf57;
}




/* --- Responsive --- */
@media (max-width: 600px) {
  .giallo-cell {
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  .giallo-bingo-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 500px) {
  .giallo-cell {
    aspect-ratio: auto;
    min-height: 70px;
  }
}




