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

.cbx-preferences-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

  &: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: 100px;
    }
  }

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

.button-group {
  @include settings.settings-button-group;
}

.theme-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;

  .theme-option {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    i {
      color: white;
      font-size: settings.$settings-section-description-size;
      font-weight: bold;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    &:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    &.selected {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 25%, transparent);
    }
  }
}
