/* Settings-specific visual overrides kept separate for maintainability. */

/* Settings Modal - Glass Design */
.settings-dialog {
  position: fixed;
  padding: 0;
  border: none;
  border-radius: 24px;
  background: transparent;
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow: visible;
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.settings-content {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%,
    rgba(245, 255, 250, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(52, 199, 89, 0.3);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: dialogFadeIn 0.3s ease-out;
  box-shadow: 
    0 20px 60px rgba(52, 199, 89, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

@media (prefers-color-scheme: dark) {
  .settings-content {
    background: linear-gradient(135deg, 
      rgba(20, 20, 20, 0.98) 0%,
      rgba(15, 25, 18, 0.95) 100%);
    border: 2px solid rgba(52, 199, 89, 0.4);
  }
}

/* Headers - Green Theme */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid rgba(52, 199, 89, 0.3);
}

.settings-header h2 {
  color: var(--nature-green) !important;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(52, 199, 89, 0.2);
}

/* Fieldsets */
fieldset {
  border: 2px solid rgba(52, 199, 89, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  background: linear-gradient(135deg,
    rgba(52, 199, 89, 0.06) 0%,
    rgba(102, 229, 139, 0.03) 100%);
  margin-bottom: 1.5rem;
}

/* Legend - Green */
legend {
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  color: var(--nature-green) !important;
  padding: 0 1rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Preset Duration Buttons - BEAUTIFUL VERSION */
.duration-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.preset-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  padding: 1rem 0.75rem !important;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(240, 255, 245, 0.8) 100%) !important;
  border: 2px solid rgba(52, 199, 89, 0.4) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-height: 85px !important;
  box-shadow: 0 3px 10px rgba(52, 199, 89, 0.15) !important;
  position: relative !important;
  overflow: hidden !important;
}

@media (prefers-color-scheme: dark) {
  .preset-btn {
    background: linear-gradient(135deg,
      rgba(52, 199, 89, 0.15) 0%,
      rgba(52, 199, 89, 0.08) 100%) !important;
  }
}

.preset-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(52, 199, 89, 0.1), 
    rgba(102, 229, 139, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preset-btn:hover {
  background: linear-gradient(135deg,
    rgba(52, 199, 89, 0.25) 0%,
    rgba(102, 229, 139, 0.15) 100%) !important;
  border-color: rgba(52, 199, 89, 0.7) !important;
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3) !important;
}

.preset-btn:hover::before {
  opacity: 1;
}

.preset-btn.active {
  background: linear-gradient(135deg, 
    var(--nature-green) 0%, 
    var(--dark-green) 100%) !important;
  border-color: var(--nature-green) !important;
  color: white !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 10px 30px rgba(52, 199, 89, 0.5) !important;
}

.preset-time {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--nature-green) !important;
  line-height: 1.2 !important;
  display: block !important;
}

.preset-btn.active .preset-time {
  color: white !important;
}

.preset-label {
  font-size: 0.75rem !important;
  color: var(--text-secondary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 600 !important;
  display: block !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

.preset-btn.active .preset-label {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* OR Divider - Green Theme */
.duration-divider {
  text-align: center;
  position: relative;
  margin: 2rem 0 1.75rem 0;
  height: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duration-divider::before,
.duration-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 70px);
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(52, 199, 89, 0.4),
    transparent);
}

.duration-divider::before { left: 0; }
.duration-divider::after { right: 0; }

.duration-divider span {
  background: white;
  padding: 0.5rem 1.5rem !important;
  color: var(--nature-green) !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  border: 2px solid rgba(52, 199, 89, 0.3);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.15);
  display: block !important;
  position: relative;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .duration-divider span {
    background: rgba(20, 20, 20, 0.95);
  }
}

/* Custom Inputs */
.duration-inputs-custom {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.duration-inputs-custom .form-group {
  flex: 0 0 140px;
}

.duration-inputs-custom label {
  display: block !important;
  margin-bottom: 0.5rem !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: var(--nature-green) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  text-align: center !important;
}

.duration-separator {
  font-size: 3rem !important;
  font-weight: 700 !important;
  color: var(--nature-green) !important;
  padding-bottom: 1rem !important;
  text-shadow: 0 3px 6px rgba(52, 199, 89, 0.3) !important;
}

.duration-input-large {
  font-size: 2rem !important;
  text-align: center !important;
  font-weight: 700 !important;
  padding: 1.25rem !important;
  border: 3px solid rgba(52, 199, 89, 0.4) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(240, 255, 245, 0.9) 100%) !important;
  color: var(--nature-green) !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.1) !important;
  width: 100% !important;
}

@media (prefers-color-scheme: dark) {
  .duration-input-large {
    background: linear-gradient(135deg,
      rgba(52, 199, 89, 0.15) 0%,
      rgba(52, 199, 89, 0.08) 100%) !important;
  }
}

.duration-input-large:focus {
  border-color: var(--nature-green) !important;
  box-shadow: 
    0 0 0 5px rgba(52, 199, 89, 0.2) !important,
    0 6px 16px rgba(52, 199, 89, 0.25) !important;
  background: linear-gradient(135deg,
    rgba(52, 199, 89, 0.18) 0%,
    rgba(102, 229, 139, 0.12) 100%) !important;
  outline: none !important;
}

/* SLIDER - Green Theme, Extended to 8 Hours */
.duration-slider-container {
  margin-top: 2rem !important;
  padding-top: 2rem !important;
  border-top: 2px solid rgba(52, 199, 89, 0.2) !important;
}

.duration-slider-container label {
  display: block !important;
  margin-bottom: 1rem !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: var(--nature-green) !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-align: center !important;
}

#durationSlider {
  width: 100% !important;
  height: 12px !important;
  border-radius: 6px !important;
  background: linear-gradient(to right, 
    rgba(52, 199, 89, 0.3) 0%, 
    rgba(52, 199, 89, 0.6) 50%,
    rgba(52, 199, 89, 0.8) 100%) !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 1rem 0 !important;
  box-shadow: 
    0 3px 10px rgba(52, 199, 89, 0.2) inset,
    0 2px 4px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer !important;
}

#durationSlider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, 
    var(--nature-green) 0%, 
    var(--dark-green) 100%) !important;
  cursor: grab !important;
  box-shadow: 
    0 4px 12px rgba(52, 199, 89, 0.6),
    0 0 0 5px rgba(255, 255, 255, 0.95),
    0 0 0 7px rgba(52, 199, 89, 0.4) !important;
  transition: all 0.3s ease !important;
  border: none !important;
}

#durationSlider::-webkit-slider-thumb:hover {
  transform: scale(1.2) !important;
  box-shadow: 
    0 6px 18px rgba(52, 199, 89, 0.7),
    0 0 0 6px rgba(255, 255, 255, 1),
    0 0 0 8px rgba(52, 199, 89, 0.5) !important;
}

#durationSlider::-webkit-slider-thumb:active {
  cursor: grabbing !important;
  transform: scale(1.1) !important;
}

#durationSlider::-moz-range-thumb {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, 
    var(--nature-green) 0%, 
    var(--dark-green) 100%) !important;
  cursor: grab !important;
  border: 5px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 
    0 4px 12px rgba(52, 199, 89, 0.6),
    0 0 0 2px rgba(52, 199, 89, 0.4) !important;
  transition: all 0.3s ease !important;
}

#durationSlider::-moz-range-thumb:hover {
  transform: scale(1.2) !important;
  box-shadow: 
    0 6px 18px rgba(52, 199, 89, 0.7),
    0 0 0 3px rgba(52, 199, 89, 0.5) !important;
}

#durationSlider::-moz-range-thumb:active {
  cursor: grabbing !important;
}

.slider-value {
  text-align: center !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: var(--nature-green) !important;
  margin-top: 1rem !important;
  text-shadow: 0 3px 6px rgba(52, 199, 89, 0.25) !important;
  padding: 0.75rem !important;
  background: linear-gradient(135deg,
    rgba(52, 199, 89, 0.15) 0%,
    rgba(102, 229, 139, 0.08) 100%) !important;
  border-radius: 14px !important;
  border: 2px solid rgba(52, 199, 89, 0.25) !important;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.1) !important;
}

/* Save Button */
.settings-actions {
  margin-top: 2rem;
}

.settings-actions .btn-primary {
  width: 100%;
  padding: 1.5rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, 
    var(--nature-green) 0%, 
    var(--dark-green) 100%);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.4);
  border: none;
}

.settings-actions .btn-primary:hover {
  box-shadow: 0 12px 32px rgba(52, 199, 89, 0.5);
  transform: translateY(-3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .duration-presets {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  
  .preset-btn {
    min-height: 75px !important;
    padding: 0.85rem 0.6rem !important;
  }
  
  .preset-time {
    font-size: 1.1rem !important;
  }
  
  .preset-label {
    font-size: 0.7rem !important;
  }
  
  .duration-inputs-custom {
    flex-direction: column;
    gap: 1rem;
  }
  
  .duration-inputs-custom .form-group {
    width: 100%;
  }
  
  .duration-separator {
    display: none !important;
  }
}
/* Settings submit hint */
.settings-enter-hint {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Pomodoro section readability fixes */
.pomodoro-settings-fieldset .reminder-name,
.pomodoro-settings-fieldset .checkbox-text,
.pomodoro-settings-fieldset .form-help,
.pomodoro-settings-fieldset p {
  color: var(--text-primary) !important;
}

.pomodoro-settings-fieldset select,
.pomodoro-settings-fieldset option {
  color: var(--text-primary) !important;
  background-color: rgba(255, 255, 255, 0.96);
}

@media (prefers-color-scheme: dark) {
  .pomodoro-settings-fieldset select {
    color: #f2f2f7 !important;
    background-color: #1f1f1f !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
  }

  .pomodoro-settings-fieldset .reminder-name,
  .pomodoro-settings-fieldset .checkbox-text,
  .pomodoro-settings-fieldset .form-help,
  .pomodoro-settings-fieldset p {
    color: #f2f2f7 !important;
  }

  .pomodoro-settings-fieldset option {
    color: #f2f2f7 !important;
    background-color: #1f1f1f;
  }
}
