/* =========================================================================
   kw-icon-box — standalone copy of Flatsome's icon-box styles.
   Self-contained, no inheritance from .icon-box. Override freely.
   ========================================================================= */

.kw-icon-box {
    padding-left: 0;
    padding-right: 0;
}

/* --- Image wrapper ------------------------------------------------------- */
.kw-icon-box .kw-icon-box__img {
    margin-bottom: 0;
    max-width: 100%;
    position: relative;
}

.kw-icon-box__img img,
.kw-icon-box__img svg {
    width: 100%;
    padding-top: 0;
}

/* --- Inline SVG colouring ----------------------------------------------- */
.kw-icon-box__img svg {
    fill: currentColor;
    height: 100%;
    width: 100%;
    transition: all .3s;
}

.kw-icon-box__img svg path {
    fill: currentColor;
}

/* Preserve outline-only icons (svg or descendants with explicit fill="none") */
.kw-icon-box__img svg[fill="none"],
.kw-icon-box__img svg[fill="none"] *:not([fill]),
.kw-icon-box__img svg [fill="none"] {
    fill: none;
}

/* Stroked icons follow the colour picker too */
.kw-icon-box__img svg *[stroke]:not([stroke="none"]) {
    stroke: currentColor;
}

/* --- Has-bg variant: circular background that fills on hover ------------ */
.kw-icon-box__img--has-bg .kw-icon-box__icon {
    height: 0;
    overflow: hidden;
    padding-top: 100%;
    position: relative;
}

.kw-icon-box__img--has-bg .kw-icon-box__icon .kw-icon-box__inner {
    border: 2px solid;
    border-radius: 100%;
    color: var(--fs-color-primary);
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    transition: all .3s;
}

.kw-icon-box:hover .kw-icon-box__img--has-bg .kw-icon-box__inner {
    background-color: currentColor;
}

.kw-icon-box:hover .kw-icon-box__img--has-bg svg,
.kw-icon-box:hover .kw-icon-box__img--has-bg svg path {
    fill: #fff;
}

.kw-icon-box__img--has-bg .kw-icon-box__icon img,
.kw-icon-box__img--has-bg .kw-icon-box__icon svg {
    position: absolute;
    left: 0;
    top: 50%;
    width: 60%;
    margin: 0 20%;
    padding: 0;
    object-fit: cover;
    transform: translateY(-50%);
}

/* --- Optional link wrapper ---------------------------------------------- */
.kw-icon-box-link {
    display: inline-block;
    line-height: 0;
}
