.settings-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--card-background);
  border: 1px solid var(--p-content-border-color);
  border-radius: 8px;
  padding: 1.5rem;

  @media (max-width: 768px) {
    padding: 1rem;
    gap: 1rem;
  }
}

.section-header {
  margin-bottom: 0.25rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;

  .pi {
    color: var(--primary-color);
    font-size: 1.125rem;
  }
}

.section-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--p-text-muted-color);
  margin: 0;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 1rem;

  @media (max-width: 768px) {
    padding-left: 0.5rem;
  }
}

.setting-item {
  padding: 0.875rem 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
  background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);

  @media (max-width: 768px) {
    padding: 0.75rem;
  }
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.action-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.action-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-color);
}

.action-description {
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
  line-height: 1.4;
}

.weights-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.weights-icon {
  color: var(--primary-color);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.weights-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
}

.weights-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--p-content-border-color);

  @media (max-width: 768px) {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  @media (max-width: 400px) {
    grid-template-columns: 1fr;
  }
}

.weight-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: var(--ground-background);
  border: 1px solid var(--p-content-border-color);
  border-radius: 4px;

  .field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    text-transform: capitalize;
  }

  ::ng-deep p-inputnumber {
    width: 6rem;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--p-content-border-color);

  @media (max-width: 768px) {
    p-button {
      width: 100%;
    }
  }
}
