
@st-namespace 'RatingsInput-st-css';
@st-import [ --wix-color-5, --wix-color-8, --wix-color-29 ] from '@wix/tpa-style-webpack-plugin/stylable-variables.st.css';
@st-import [ createColor, setColor, createFont, createFontWithOverrides ] from '../../common/formatters.st';
@st-import [ fontFamily ] from '../../common/fonts.st.css';
@st-import [ errorColor-rgb, focusRing ] from '../../common/palette.st.css';
@st-import [
  --wst-paragraph-2-color-rgb,
  --wst-links-and-actions-color-rgb,
  --wst-system-error-color-rgb,
  --wst-shade-3-color-rgb,
] from '@wix/wix-site-theme-variables/stylable-variables.st.css';


/*
 * Icon color
 * @type color
 */
@property st-global(--wix-ui-tpa-ratings-input-icon-color);

/*
 * Label font
 * @type font
 */
@property st-global(--wix-ui-tpa-ratings-input-label-font);

/*
 * Label color
 * @type color
 */
@property st-global(--wix-ui-tpa-ratings-input-label-color);

/*
 * Reaction font
 * @type font
 */
@property st-global(--wix-ui-tpa-ratings-input-reaction-label-font-family);

/*
 * Reaction color
 * @type color
 */
@property st-global(--wix-ui-tpa-ratings-input-reaction-label-color);

/*
 * Color representing an error
 * @type color
 * @default #DF3131
*/
@property st-global(--wix-ui-tpa-ratings-input-error-color);

.root {
  -st-states: layout(enum(labelTop, labelAside)), size(enum(small, large)), disabled, withError;
  --small-font-family-default: value(fontFamily);
}

.root:withError {
  -st-mixin:
    setColor(--wix-ui-tpa-error-message-wrapper-error-color, --wix-ui-tpa-ratings-input-error-color, value(errorColor-rgb));
}

.container {
  display: flex;
  flex-direction: row;
  align-items: center;
  border: none;
  padding: 0;
  margin: 0;
}

.label {
  display: flex;
  color: createColor(--wix-ui-tpa-ratings-input-label-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
  -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.4em", "size": "14px" }'),
  createFont((--wix-ui-tpa-ratings-input-label-font, --wst-paragraph-2-overriden-font), 'Body-M');
  padding-inline-start: 0;
}

.root:layout(labelAside) .label {
  float: left;
  padding-inline-end: 12px;
}

.root:layout(labelTop) .label {
  padding-bottom: 8px;
}

.ratingLabel {
  -st-states: size(enum(small, large));
  color: createColor(--wix-ui-tpa-ratings-input-reaction-label-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
}

.ratingLabel:size(small) {
  -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "family": "var(--small-font-family-default)" }'),
  createFont((--wix-ui-tpa-ratings-input-reaction-label-font-family, --wst-paragraph-2-overriden-font), LIGHT);
}

.ratingLabel:size(large) {
  -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.25em", "size": "32px" }'),
  createFont((--wix-ui-tpa-ratings-input-reaction-label-font-family, --wst-paragraph-2-overriden-font), 'Heading-M');
}

.root:size(small) .ratingLabel {
  font-size: 14px;
  margin-inline-start: 12px;
}

.root:size(large) .ratingLabel {
  font-size: 32px;
  margin-inline-start: 24px;
}

.ratingsWrapper {
  display: flex;
}

.root:size(large) .ratingsWrapper .ratingItem:not(:last-child) {
  margin-inline-end: 8px;
}

.ratingItem {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.root:size(small) .ratingItem {
  height: 24px;
}

.root:size(large) .ratingItem {
  height: 40px;
}

.root:disabled .ratingItem {
  cursor: default;
}

.ratingItem:focus-within {
  -st-mixin: focusRing();
}

.icon {
  display: flex;
  color: createColor(--wix-ui-tpa-ratings-input-icon-color, var(--wst-links-and-actions-color-rgb, var(--wix-color-8)));
}

.root:disabled .icon {
  color: rgb(var(--wst-shade-3-color-rgb, var(--wix-color-29)));
}

.root:withError .icon {
  color: createColor(--wix-ui-tpa-ratings-input-error-color, var(--wst-system-error-color-rgb, value(errorColor-rgb)));
}

.root:withError .ratingsWrapper:hover .icon {
  color: createColor(--wix-ui-tpa-ratings-input-icon-color, var(--wix-color-8));
}

.visuallyHidden {
  position: absolute;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
}

/* st-namespace-reference="../../../../src/components/RatingsInput/RatingsInput.st.css" */
    