/* Word Finder Forms V2 */
.word-finder-forms.v2 {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.word-finder-forms.v2 .form-section {
  width: 100%;
}

/* Unscramble form */
.word-finder-forms.v2 .unscramble-section .find-words-container {
  display: flex;
  align-items: center;
  padding: 14px 23px;
}

.word-finder-forms.v2 .unscramble-section .search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #e6e1f4;
  border-radius: 8px;
  padding: 5px;
  background: white;
  margin: 0;
}

.word-finder-forms.v2 .unscramble-section .search-box:focus-within {
  border-color: #43306c;
  box-shadow: 0 0 0 3px rgba(67, 48, 108, 0.1);
}

.word-finder-forms.v2 .unscramble-section .search-input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 18px;
  background: transparent;
  outline: none;
}

/* Find words form */
.word-finder-forms.v2 .find-words-container {
  border: 1px solid #e6e1f4;
  padding: 24px;
  border-radius: 8px;
  background: #ebe7f4;
}

.word-finder-forms.v2 .find-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.word-finder-forms.v2 .find-line:last-child {
  margin-bottom: 0;
}

.word-finder-forms.v2 .find-text {
  font-size: 18px;
  white-space: nowrap;
  margin: 0 12px;
}

.word-finder-forms.v2 .search-type-select {
  width: 30%;
}

.word-finder-forms.v2 .word-length-select,
.word-finder-forms.v2 .search-type-select {
  background: white;
  border: 1px solid #e6e1f4;
  border-radius: 4px;
  padding: 8px 12px;
  padding-right: 30px;
  font-size: 16px;
  height: 40px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  background-image: url('data:image/svg+xml;utf8,<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
}

.word-finder-forms.v2 .word-length-select:focus,
.word-finder-forms.v2 .search-type-select:focus,
.word-finder-forms.v2 .search-input-wrapper:focus-within {
  outline: none;
  border-color: #43306c;
  box-shadow: 0 0 0 3px rgba(67, 48, 108, 0.1);
}

.word-finder-forms.v2 .search-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.word-finder-forms.v2 .search-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  background: white;
  border: 1px solid #e6e1f4;
  border-radius: 4px;
  height: 40px;
}

.word-finder-forms.v2 .search-input {
  border: none;
  padding: 8px 12px;
  font-size: 18px;
  width: 100%;
  height: 100%;
  background: transparent;
  outline: none;
}

.word-finder-forms.v2 .search-input::placeholder {
  color: #666;
  opacity: 1;
  font-size: 16px;
}

.word-finder-forms.v2 .search-input:focus::placeholder {
  opacity: 0.7;
}

/* Style for the first search button (icon only) */
.word-finder-forms.v2 .unscramble-section .search-button {
  background: #43306c;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  width: auto;
}

/* Style for search button icons */
.word-finder-forms.v2 .search-button svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Hover effect for both buttons */
.word-finder-forms.v2 .search-button:hover {
  background: #5a4a7a;
}

/* Style for the second search button (Find Words) */
.word-finder-forms.v2 .find-section .search-button {
  background: #43306c;
  border-radius: 4px;
  padding: 8px;
  color: white;
  font-size: 16px;
  text-align: center;
  width: 100%;
  cursor: pointer;
}

.word-finder-forms.v2 .or-divider {
  text-align: center;
  position: relative;
  padding: 0;
}

.word-finder-forms.v2 .or-divider span {
  background: white;
  padding: 0 20px;
  color: #333;
  font-size: 19px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  border: 1px solid #c4bedd;
  border-radius: 4px;
}

.word-finder-forms.v2 .or-divider:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #c4bedd;
}

/* Input validation */
.word-finder-forms.v2 .search-input:invalid {
  border-color: #ff4444;
}

.word-finder-forms.v2 .search-type-select,
.word-finder-forms.v2 .word-length-select {
  margin-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .word-finder-forms.v2 .find-line {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
  }

  .word-finder-forms.v2 .find-text {
    margin: 0 4px;
    white-space: nowrap;
    font-size: 14px;
  }

  .word-finder-forms.v2 .word-length-select {
    flex: 1;
    min-width: 0;
    font-size: 14px;
  }

  .word-finder-forms.v2 .find-line:last-child {
    flex-direction: column;
    width: 100%;
  }

  .word-finder-forms.v2 .search-group {
    width: 100%;
  }

  .word-finder-forms.v2 .search-type-select {
    width: 45%;
  }

  .word-finder-forms.v2 .search-input-wrapper {
    width: 60%;
  }

  .word-finder-forms.v2 .search-input {
    font-size: 14px;
  }
}

.tooltip-popup {
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  width: 200px;
  text-align: center;
  z-index: 9999999999999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tooltip-popup::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent #333;
}
