/* === Base Styles === */

.jumble-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  text-align: center;
}

.jumble-header h1 {
  color: #004a44;
  font-size: 36px;
  font-weight: bold;
  margin: 0;
}

.jumble-header img {
  width: 40px;
  height: 40px;
  margin-right: 15px;
}

.jumble-header .header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.section {
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: linear-gradient(
    to bottom left,
    rgb(250, 225, 111) 40%,
    white 60%
  );
  border: 2px solid #e1ce9b;
}

.button-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.row-heading {
  font-weight: bold;
  font-size: 18px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buttons button {
  padding: 8px 15px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}

.buttons button:hover {
  background-color: #e0e0e0;
}

.yellow {
  background: linear-gradient(
    to bottom left,
    rgb(250, 225, 111) 40%,
    white 60%
  );
}

.green {
  background: linear-gradient(
    to bottom left,
    rgb(185, 209, 136) 40%,
    white 60%
  );
}

.blue {
  background: linear-gradient(
    to bottom left,
    rgb(176, 194, 237) 40%,
    white 60%
  );
}

.purple {
  background: linear-gradient(
    to bottom left,
    rgb(207, 171, 215) 40%,
    white 60%
  );
}

.form-container {
  margin-bottom: 20px;
  text-align: center;
}

label {
  margin-right: 10px;
}

input[type="date"] {
  padding: 5px;
  margin-right: 10px;
}

button[type="submit"] {
  padding: 5px 10px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
}

button.btn-light {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.button-thumbnail {
  vertical-align: middle;
  margin: 0;
}

.eye-icon {
  cursor: pointer;
  display: inline-block;
  margin-left: 10px;
}

.eye-icon-img {
  vertical-align: middle;
}

.content-text {
  display: block;
  padding-left: 0px;
  filter: blur(5px);
  padding-bottom: 15px;
  font-size: 20px;
}

.content-text.visible {
  filter: none;
}

.word-buttons {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  gap: 0.5em;
}

.word-button {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 15px;
  cursor: pointer;
}

.word-button:hover {
  background-color: #e0e0e0;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 10px;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

#dateWrapper {
  text-align: center;
}

.date-controls {
  display: inline-block;
  margin-left: 8px;
}

.hint-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 90%;
}

.hint-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint-header .eye-icon-img {
  cursor: pointer;
}

.section-divider {
  border-top: 1px solid #e1ce9b;
  width: calc(100% + 40px);
  margin: 16px -20px;
}

/* === Responsive Styles === */

@media (max-width: 768px) {
  .jumble-header h1 {
    font-size: 28px;
  }

  .row-heading {
    font-size: 17px;
  }

  .word-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    row-gap: 10px;
    width: 100%;
  }

  .word-button {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    margin: 0;
  }

  .content-text {
    padding-top: 15px;
    padding-right: 15px;
    font-size: 15px;
  }

  .form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  input[type="date"],
  button[type="submit"] {
    width: 100%;
    margin-bottom: 10px;
  }

  #dateWrapper {
    text-align: center;
  }

  .date-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    margin-top: 5px;
    gap: 6px;
  }

  .date-controls a,
  .date-controls input[type="date"] {
    width: auto;
  }
}

@media (max-width: 480px) {
  .jumble-header h1 {
    font-size: 22px;
  }

  .section {
    padding: 15px;
  }

  .button-thumbnail,
  .eye-icon-img,
  .color-swatch {
    width: 20px;
    height: 20px;
  }

  .row-heading {
    font-size: 16px;
  }

  h2 {
    font-size: 16px;
  }
}

.date-controls {
  position: relative;
  display: inline-block;
}

.solution-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.solution-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.solution-word {
  display: flex;
  gap: 0.5rem;
}

.word-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.word-toggle .icon-eye-open {
  display: none;
}
.word-toggle .icon-eye-closed {
  display: inline;
}

.word-toggle[aria-pressed="true"] .icon-eye-open {
  display: inline;
}
.word-toggle[aria-pressed="true"] .icon-eye-closed {
  display: none;
}

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font: 600 18px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
}
.tile--revealed {
  border-color: #10b981;
  box-shadow: 0 0 0 2px #10b98122 inset;
  background: #ecfdf5;
}

.bank-letter {
  display: inline-block;
  margin: 0 2px;
  font-weight: bold;
  transition: opacity 0.2s ease;
}

.bank-letter.used {
  opacity: 0.3;
  text-decoration: line-through;
}