@use '../../../shared/styles/settings-shared' as settings;

.main-container {
  @include settings.settings-page-container;
}

@include settings.settings-page-header;

.settings-title {
  @include settings.settings-page-title;
  margin-bottom: 0.75rem;
}

.settings-description {
  @include settings.settings-page-description;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.preferences-section {
  @media (min-width: 768px) {
    padding: 0 1rem;
  }
}

.section-header {
  @include settings.settings-section-header;
  margin-bottom: 1rem;
}

.section-title {
  @include settings.settings-section-title;
  margin: 0;
}

.settings-card {
  @include settings.settings-card;
}

.setting-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

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

.setting-info {
  flex: 1;
  min-width: 0;

  .setting-label {
    display: block;
    font-weight: settings.$settings-section-title-weight;
    color: var(--p-text-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .setting-label-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;

    .setting-label {
      margin-bottom: 0;
      flex-shrink: 0;
      min-width: 180px;
    }

    .input-group {
      display: flex;
      align-items: center;
      gap: 0.75rem;

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

  .setting-description {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--p-text-muted-color);
    font-size: settings.$settings-section-description-size;
    line-height: 1.5;
    margin: 0;

    .pi {
      color: var(--p-primary-color);
      margin-top: 0.125rem;
      flex-shrink: 0;
    }
  }
}

.setting-control {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;

  @media (max-width: 768px) {
    align-items: flex-start;
    width: 100%;
  }
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;

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

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;

  input {
    padding-right: 2.5rem;
    width: 120px;
  }

  .unit {
    position: absolute;
    right: 0.75rem;
    color: var(--p-text-muted-color);
    font-size: settings.$settings-section-description-size;
    pointer-events: none;
  }
}

.warning-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
  margin-top: 0.5rem;

  .pi {
    color: var(--p-orange-500);
    font-size: settings.$settings-section-description-size;
  }

  @media (max-width: 768px) {
    margin-top: 0.5rem;
  }
}

.slider-container {
  flex: 1;
  min-width: 200px;
  max-width: 300px;

  @media (max-width: 768px) {
    min-width: 180px;
    max-width: 250px;
  }
}
