/* Settings Modal & Controls Styles */

.settings-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-color);
}

.settings-section:last-of-type {
  border-bottom: none;
}

.settings-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.setting-item {
  margin-bottom: 1rem;
}

.setting-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Range Slider */
input[type=range] {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  transition: background .15s ease-in-out;
}

input[type=range]::-webkit-slider-thumb:hover {
  background: var(--accent-secondary);
}

/* Select Dropdown */
.voice-select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Toggle Switch */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Settings Actions */
.settings-actions {
  text-align: right;
  margin-bottom: 1rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.btn-text:hover {
  color: var(--color-red);
  background-color: rgba(217, 56, 56, 0.1);
}

/* Danger Button */
.btn-danger {
  background-color: var(--color-red);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(217, 56, 56, 0.3);
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.btn-danger:hover {
  background-color: #c02828;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 56, 56, 0.4);
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 56, 56, 0.3);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-duration, 0.25s) ease;
  width: auto;
  min-width: 110px;
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Settings Warning Text */
.settings-warning {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: rgba(217, 56, 56, 0.1);
  border-left: 3px solid var(--color-red);
  border-radius: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Dark Theme */
[data-theme="dark"] .setting-item label {
  color: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

[data-theme="dark"] input[type=range] {
  background: #4a5568;
}

[data-theme="dark"] .settings-warning {
  background-color: rgba(217, 56, 56, 0.15);
  color: rgba(255, 255, 255, 0.85);
}
