
@st-namespace 'IconButton-st-css';
@st-import [ --wix-color-1, --wix-color-5, --wix-color-29 ] from '@wix/tpa-style-webpack-plugin/stylable-variables.st.css';
@st-import [ --wst-paragraph-2-color-rgb, --wst-primary-background-color-rgb, --wst-system-disabled-color-rgb ] from '@wix/wix-site-theme-variables/stylable-variables.st.css';
@st-import ButtonNext from '../internal/WixUiCoreComponents/components/CoreButtonNext/CoreButtonNext.st.css';
@st-import [ createColor ] from '../../common/formatters.st';

/*
 * Color
 * @type color
*/
@property st-global(--wix-ui-tpa-icon-button-icon-color);

/*
 * Background color
 * @type color
*/
@property st-global(--wix-ui-tpa-icon-button-background-color);

/*
 * Hover opacity
 * @type size
 * @default 70%
 */
@property st-global(--wix-ui-tpa-icon-button-hover-opacity);

.root {
    -st-extends: ButtonNext;
    -st-states: disabled, skin(enum(line, full)), theme(enum(none, box));
    /*css goes here*/
    text-decoration: none;
    border: none;
    display: inline-block;
    padding: 0;
    margin: 0;
    line-height: 0;
}

.root:hover,
.root:focus {
    opacity: var(--wix-ui-tpa-icon-button-hover-opacity, 0.7);
}

.root:disabled {
    cursor: default;
}

.root:disabled:hover {
    opacity: 1;
}

.icon svg {
    display: block;
}

.root:disabled.skin-line .icon svg:not([fill="currentColor"]) path {
    stroke: rgb(var(--wst-system-disabled-color-rgb, var(--wix-color-29)));
    fill: none;
}

.root:disabled.skin-full .icon svg:not([fill="currentColor"]) path {
    fill: rgb(var(--wst-system-disabled-color-rgb, var(--wix-color-29)));
    stroke: rgb(var(--wst-system-disabled-color-rgb, var(--wix-color-29)));
}

/* Variants - including style overrides capabilities */
/* but also support state syntax */

.skin-line .icon svg:not([fill="currentColor"]) path,
.root:skin(line) .icon svg:not([fill="currentColor"]) path {
    stroke: createColor(--wix-ui-tpa-icon-button-icon-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
    fill: none;
}

.skin-full .icon svg:not([fill="currentColor"]) path,
.root:skin(full) .icon svg:not([fill="currentColor"]) path {
    fill: createColor(--wix-ui-tpa-icon-button-icon-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
    stroke: createColor(--wix-ui-tpa-icon-button-icon-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
}


/* --------- new icons ---------- */

.root .icon svg[fill="currentColor"] {
    color: createColor(--wix-ui-tpa-icon-button-icon-color, var(--wst-paragraph-2-color-rgb, var(--wix-color-5)));
}

.root:disabled .icon svg[fill="currentColor"] {
    color: rgb(var(--wst-system-disabled-color-rgb, var(--wix-color-29)));
}

.root:theme(none) {
    background-color: transparent;
}

.root:theme(box) {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: createColor(--wix-ui-tpa-icon-button-background-color, var(--wst-primary-background-color-rgb, var(--wix-color-1)));
}

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