/* Add these styles at the end of your existing CSS */
.language-modal .modal-description {
  height: auto;
  padding: 0;
  overflow: visible;
  width: 100%;
}

.modal-description .lang-list-wrapper {
  height: 100%;
}

.language-modal.modal-container {
  width: 480px;
  height: 439px;
  display: flex;
  padding: 24px 0px 40px 0px;
  flex-direction: column;
  align-items: start;
  background: var(--bg-primary);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
}

@media only screen and (max-width: 1024px) {
  .language-modal.modal-container {
    height: 500px;
    width: 393px;
    padding-bottom: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }
}

.dark-mode.language-modal.modal-container {
  background: var(--text-secondary);
}

.language-modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  margin-top: 16px;
}

@media only screen and (max-width: 1024px) {
  .language-modal-content {
    margin-top: 24px;
  }
}

.language-label {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  margin-bottom: 12px;
}

.language-options-wrapper {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) transparent;
}

.language-options-wrapper::-webkit-scrollbar {
  width: 6px;
}

.language-options-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.language-options-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--border-primary);
  border-radius: 3px;
}

.language-selection {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 300px;
  margin-left: 16px;
}

.language-option {
  padding: 8px 4px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.language-option:hover {
  background-color: var(--bg-secondary);
}

.dark-mode .language-option:hover {
  background-color: var(--bg-primary);
}

.language-option label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-primary);
  position: relative;
}

.dark-mode .language-option label {
  color: var(--bg-primary);
}

.dark-mode .language-option:hover label {
  color: var(--text-primary);
}

.lang-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hide the default radio button */
.language-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom radio button */
.radio-custom {
  position: absolute;
  left: 0;
  height: 16px;
  width: 16px;
  border: 1px solid var(--border-primary);
  border-radius: 50%;
  transition: all 0.2s;
  background: var(--bg-primary);
}

.dark-mode .radio-custom {
  background: var(--text-secondary);
}

/* Radio button checked state */
.language-option input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--action-primary);
  border-width: 4px;
}

.default-tag {
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  gap: 16px;
  margin: 16px 0 0 24px;
  width: 200px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@media only screen and (max-width: 1024px) {
  .modal-actions {
    width: auto;
    display: flex;
    padding: 24px;
    margin: 0;
    justify-content: center;
    align-items: flex-start;
    flex-direction: row-reverse;
    gap: 16px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
  }

  .dark-mode .modal-actions {
    background-color: var(--action-secondary);
  }
}

.modal-btn {
  flex: 1;
  padding: 16px 24px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.save-btn {
  background-color: var(--action-secondary);
  color: var(--bg-primary);
}

.dark-mode .save-btn {
  background-color: var(--button-primary);
  color: var(--bg-primary);
}

.cancel-btn {
  background-color: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
}

.dark-mode .cancel-btn {
  border-color: var(--text-tertiary);
  color: var(--bg-secondary);
}

.save-btn:hover {
  opacity: 0.9;
}

.cancel-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .cancel-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

/* Add these styles */
.save-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.dark-mode .save-btn.disabled {
  opacity: 0.3;
}
