
@st-namespace 'TextButton-st-css';
@st-import [ --wix-color-8, --wix-color-5, --wix-color-29 ] from '@wix/tpa-style-webpack-plugin/stylable-variables.st.css';
@st-import ButtonNext from '../internal/WixUiCoreComponents/components/CoreButtonNext/CoreButtonNext.st.css';
@st-import [ createFont, createColor, createFontWithOverrides ] from '../../common/formatters.st';
@st-import [
  --wst-links-and-actions-color-rgb,
  --wst-paragraph-2-color-rgb,
  --wst-system-disabled-color-rgb
] from '@wix/wix-site-theme-variables/stylable-variables.st.css';

/*
 * The color of the text instead of the default
 * @type color
 * @default --wix-color-8 for primary | overrides: { --wix-color-5 for others
 */
@property st-global(--wix-ui-tpa-text-button-main-text-color);

/*
 * The font of the text instead of the default font
 * @type font
 * @default [Desktop] preset: 'Body-M' | overrides: { size: '16px', lineHeight: '1.5em'} [Mobile] preset: 'Body-M' | overrides: { size: '14px', lineHeight: '1.44em'}
 */
@property st-global(--wix-ui-tpa-text-button-main-text-font);

/*
 * The color of the background
 * @type color
 * @default transparent
 */
@property st-global(--wix-ui-tpa-text-button-background-color);

.root {
    -st-extends: ButtonNext;
    -st-states: priority(enum(link, primary, secondary, primaryLink)),
    hoverStyle(enum(colorChange, underline)),
     mobile;
    /*css goes here*/
    --wix-ui-tpa-text-button-background-color-internal: rgb(var(--wix-ui-tpa-text-button-background-color));
    background-color: var(--wix-ui-tpa-text-button-background-color-internal, transparent);
    text-decoration: none;
    border: none;
    padding: 0;
    -st-mixin: 
    createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.5em", "size": "16px" }'),
    createFont((--wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M');
}

.root:active:hoverStyle(underline),
.root:focus:hoverStyle(underline),
.root:hover:hoverStyle(underline) {
    -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.5em", "size": "16px", "text-decoration": "underline" }'),
    createFont((--wix-ui-tpa-button-hover-text-font, --wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M');
    text-decoration: var(--wix-ui-tpa-button-hover-text-font-text-decoration, underline);
}

.root:mobile {
    -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.44em", "size": "14px" }'),
     createFont((--wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M')
}

.root:mobile:active:hoverStyle(underline),
.root:mobile:focus:hoverStyle(underline),
.root:mobile:hover:hoverStyle(underline) {
    -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.44em", "size": "14px", "text-decoration": "underline" }'),
    createFont((--wix-ui-tpa-button-hover-text-font, --wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M');
    text-decoration: var(--wix-ui-tpa-button-hover-text-font-text-decoration, underline);
}

.root:mobile:priority(link):active:hoverStyle(underline),
.root:mobile:priority(link):focus:hoverStyle(underline),
.root:mobile:priority(link):hover:hoverStyle(underline),
.root:mobile:priority(primaryLink):active:hoverStyle(underline),
.root:mobile:priority(primaryLink):focus:hoverStyle(underline),
.root:mobile:priority(primaryLink):hover:hoverStyle(underline) {
    -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.44em", "size": "14px", "text-decoration": "none" }'),
    createFont((--wix-ui-tpa-button-hover-text-font, --wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M');
    text-decoration: var(--wix-ui-tpa-button-hover-text-font-text-decoration, underline);
}

/* Primary */

.root:priority(primary) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wst-links-and-actions-color-rgb, var(--wix-color-8)));
}

.root:priority(primary):active:not(:hoverStyle(underline)),
.root:priority(primary):focus:not(:hoverStyle(underline)),
.root:priority(primary):hover:not(:hoverStyle(underline)) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wix-color-8), 0.7);
}

.root:priority(link):active:hoverStyle(underline),
.root:priority(link):focus:hoverStyle(underline),
.root:priority(link):hover:hoverStyle(underline),
.root:priority(primaryLink):active:hoverStyle(underline),
.root:priority(primaryLink):focus:hoverStyle(underline),
.root:priority(primaryLink):hover:hoverStyle(underline) {
    -st-mixin: createFontWithOverrides(--wst-paragraph-2-overriden-font, --wst-paragraph-2, '{ "line-height": "1.5em", "size": "16px", "text-decoration": "none" }'),
    createFont((--wix-ui-tpa-button-hover-text-font, --wix-ui-tpa-text-button-main-text-font, --wst-paragraph-2-overriden-font), 'Body-M');
    text-decoration: var(--wix-ui-tpa-button-hover-text-font-text-decoration, underline);
}

/* Secondary */

.root:priority(secondary) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
}

.root:priority(secondary):active:not(:hoverStyle(underline)),
.root:priority(secondary):focus:not(:hoverStyle(underline)),
.root:priority(secondary):hover:not(:hoverStyle(underline)) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wix-color-5), 0.7);
}

/* Link */

.root:priority(link) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
    text-decoration: underline;
}

.root:priority(link):active:not(:hoverStyle(underline)),
.root:priority(link):focus:not(:hoverStyle(underline)),
.root:priority(link):hover:not(:hoverStyle(underline)) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wix-color-5), 0.7);
}

/* Primary Link */

.root:priority(primaryLink) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wst-links-and-actions-color-rgb, var(--wix-color-8)));
    text-decoration: underline;
}

.root:priority(primaryLink):active:not(:hoverStyle(underline)),
.root:priority(primaryLink):focus:not(:hoverStyle(underline)),
.root:priority(primaryLink):hover:not(:hoverStyle(underline)) {
    color: createColor(--wix-ui-tpa-text-button-main-text-color, var(--wix-color-8), 0.7);
}

/* Disabled */

.root:priority(primary):disabled,
.root:priority(link):disabled,
.root:priority(secondary):disabled {
    color: rgb(var(--wst-system-disabled-color-rgb, var(--wix-color-29)))
}

.affixIcon svg {
    height: 1.5em;
    width: 1.5em;
    margin: calc(-1 * (1.5em / 4)) 0;
}

.affixIcon svg:not([fill="currentColor"]) path {
    stroke: currentColor;
    fill: none;
}

.prefix-icon::after,
.suffix-icon::before {
    content: '';
    width: 4px;
    height: 1px;
    display: inline-block;
}

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