
@st-namespace 'IconButton-deprecated-st-css';
:import {
    -st-from: "../internal/WixUiCoreComponents/components/CoreButtonNext/CoreButtonNext.st.css";
    -st-default: ButtonNext;
}

:import {
    -st-from: "../../common/formatters.st";
    -st-named: color, fallback, font, applyOpacity;
}

:vars {
    /*Defaults*/
    DefaultColor: color-5;
    DefaultBackgroundColor: color-1;
    DisabledColor: color-3;
}

:vars {
    /*Overrides*/
    IconColor: --overridable;
    BackgroundColor: --overridable;
}

/*
 * 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);

.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: 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: color(value(DisabledColor));
    fill: none;
}

.root:disabled.skin-full .icon svg:not([fill="currentColor"]) path {
    fill: color(value(DisabledColor));
    stroke: color(value(DisabledColor));
}

/* 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: color(fallback(value(IconColor), value(DefaultColor)));
    fill: none;
}

.skin-full .icon svg:not([fill="currentColor"]) path, .root:skin(full) .icon svg:not([fill="currentColor"]) path {
    fill: color(fallback(value(IconColor), value(DefaultColor)));
    stroke: color(fallback(value(IconColor), value(DefaultColor)));
}


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

.root .icon svg[fill="currentColor"] {
    color: color(fallback(value(IconColor), value(DefaultColor)));
}

.root:disabled .icon svg[fill="currentColor"] {
    color: color(value(DisabledColor));
}

.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: color(fallback(value(BackgroundColor), value(DefaultBackgroundColor)));
}

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