//
// Copyright IBM Corp. 2020, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/web-components/scss/components/search/search' as *;
@use '@carbon/ibmdotcom-styles/scss/globals/vars' as *;
//
:host(#{$c4d-prefix}-search) {
  @extend :host(#{$prefix}-search);

  &[size='sm'] {
    @extend .#{$prefix}--search--sm;
  }

  &[size='md'] {
    @extend .#{$prefix}--search--md;
  }

  &[size='lg'] {
    @extend .#{$prefix}--search--lg;
  }

  &[color-scheme='light'] {
    @extend .#{$prefix}--search--light;
  }

  /**
   * We are deliberatey diverging from the global helper mixins for placeholder, found here:
   * (https://github.com/carbon-design-system/carbon/blob/v10.25.0/packages/components/src/globals/scss/_helper-mixins.scss#L44-L51)
   *
   * The reason for this being that the current placeholder color fails contrast testing,
   * while this replacement color passes testing.
   */

  ::placeholder {
    color: $text-secondary;
  }
}
