/**
 * Settings Modal Styles
 * 
 * Customization options for tags and 3D graph
 * Tag Management for persistent and auto tags
 */

/* ==========================================================================
   Modal Overlay
   ========================================================================== */

.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.settings-modal[hidden] {
  display: none;
}

.settings-modal-content {
  background: rgba(15, 15, 15, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Modal Header
   ========================================================================== */

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
}

.settings-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.settings-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Modal Body
   ========================================================================== */

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.settings-section {
  margin-bottom: 2.5rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 1rem;
}

.settings-section-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.5rem;
}

/* ==========================================================================
   Settings Groups
   ========================================================================== */

.settings-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
}

.settings-label-hint {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: normal;
}

/* ==========================================================================
   Color Pickers
   ========================================================================== */

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.color-picker-row:last-child {
  margin-bottom: 0;
}

.color-picker-label {
  flex: 1;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.color-picker-input {
  width: 60px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.color-picker-input:hover {
  border-color: #BEFFF2;
}

.color-picker-preview {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Tag Color List
   ========================================================================== */

.tag-color-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tag-color-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.tag-color-name {
  flex: 1;
  font-size: 0.875rem;
  color: #fff;
}

.tag-color-delete {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.tag-color-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   Slider Controls
   ========================================================================== */

.slider-control {
  margin-bottom: 0.75rem;
}

.slider-control:last-child {
  margin-bottom: 0;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.slider-value {
  font-weight: 500;
  color: #BEFFF2;
}

.slider-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #BEFFF2;
  cursor: pointer;
  transition: all 0.2s;
}

.slider-input::-webkit-slider-thumb:hover {
  background: #5558e3;
  transform: scale(1.1);
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #BEFFF2;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.slider-input::-moz-range-thumb:hover {
  background: #5558e3;
  transform: scale(1.1);
}

/* ==========================================================================
   Select Controls
   ========================================================================== */

.select-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.select-control:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.select-control:focus {
  outline: none;
  border-color: #BEFFF2;
}

/* ==========================================================================
   Modal Footer
   ========================================================================== */

.settings-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.settings-button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.settings-button.primary {
  background: #BEFFF2;
  color: #fff;
}

.settings-button.primary:hover {
  background: #5558e3;
}

.settings-button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.settings-button.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==========================================================================
   Tag Management
   ========================================================================== */

.tag-management-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tag-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tag-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tag-management-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s;
}

.tag-management-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.tag-item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.tag-item-name {
  font-size: 0.9375rem;
  color: #fff;
  font-weight: 500;
}

.tag-item-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: rgba(99, 102, 241, 0.2);
  color: #BEFFF2;
  border-radius: 4px;
  font-weight: 500;
}

.tag-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-color-picker {
  width: 40px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.tag-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.tag-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.tag-color-picker::-moz-color-swatch {
  border: none;
  border-radius: 4px;
}

.tag-convert-btn,
.tag-delete-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-convert-btn:hover {
  color: #BEFFF2;
  background: rgba(99, 102, 241, 0.1);
}

.tag-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.settings-hint {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 1rem;
}

.settings-button.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.settings-button.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .settings-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .settings-header,
  .settings-body,
  .settings-footer {
    padding: 1.5rem 1rem;
  }
  
  .settings-footer {
    flex-direction: column;
  }
  
  .settings-button {
    width: 100%;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.settings-close:focus-visible,
.settings-button:focus-visible,
.color-picker-input:focus-visible,
.slider-input:focus-visible,
.select-control:focus-visible {
  outline: 2px solid #BEFFF2;
  outline-offset: 2px;
}
