.text-converter {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 8px;
  font-family: 'Inter', 'Roboto', sans-serif;
}

.text-converter__input,
.text-converter__output {
  margin-bottom: 20px;
}

.text-converter__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.text-converter__textarea {
  width: 100%;
  height: 150px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  color: #1f2937;
  background-color: #fff;
  resize: vertical;
  box-sizing: border-box;
}

.text-converter__textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-converter__textarea[readonly] {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.text-converter__options {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping to keep elements on the same line */
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-end; /* Align items to the bottom for better visual alignment */
}

.text-converter__option {
  flex: 0 0 250px; /* Fixed width for the dropdown container */
}

.text-converter__select {
  width: 100%;
  height: 40px;
  padding: 8px 24px 8px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #fff;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201L6%206L11%201%22%20stroke%3D%22%23374151%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  box-sizing: border-box;
}

.text-converter__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-converter__checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #4b5563;
  flex: 1; /* Take remaining space */
  white-space: nowrap; /* Prevent text wrapping */
}

.text-converter__checkbox {
  margin-right: 8px;
  accent-color: #3b82f6;
}

.text-converter__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-converter__button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.text-converter__button--convert {
  background-color: #3b82f6;
  color: #fff;
}

.text-converter__button--convert:hover {
  background-color: #2563eb;
}

.text-converter__button--copy {
  background-color: #d1d5db;
  color: #374151;
}

.text-converter__button--copy:hover:not(:disabled) {
  background-color: #b0b7c2;
}

.text-converter__button--download {
  background-color: #d1d5db;
  color: #374151;
}

.text-converter__button--download:hover:not(:disabled) {
  background-color: #b0b7c2;
}

.text-converter__button--clear {
  background-color: #ef4444;
  color: #fff;
}

.text-converter__button--clear:hover {
  background-color: #dc2626;
}

.text-converter__button:disabled {
  background-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .text-converter {
    padding: 15px;
  }

  .text-converter__textarea {
    height: 120px;
    font-size: 14px;
  }

  .text-converter__button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .text-converter__options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start; /* Align items to the start for mobile */
  }

  .text-converter__option {
    flex: 1 0 100%; /* Full width on mobile */
  }

  .text-converter__select {
    height: 36px;
    font-size: 13px;
  }

  .text-converter__checkbox-label {
    white-space: normal; /* Allow wrapping on mobile */
  }
}