/**
 * Fichier  : /features/share/assets/css/style.css
 * Fonction : bouton de partage des contenus FWPL
 */


/* ==================================================
   SHARE
================================================== */

.share {
    width: fit-content;
}

.share {
    display: inline-flex !important;
    align-items: center !important;
}


/* ==================================================
   BUTTON
================================================== */

.share-button {
    appearance: none;
}

.share-button {
    cursor: pointer;
}

.share-button {
    min-height: 38px;
}

.share-button {
    padding: 5px 14px 5px 6px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-button {
    border: 1px solid var(--color-border);
    background: var(--glass-background);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-card);
}


.share-button {
    font-family: 'bold-font';
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
}

.share-button {
    color: var(--color-white);
}

.share-button {
    transition:
        transform var(--transition-soft),
        box-shadow var(--transition-soft);
}


/* ==================================================
   ICON
================================================== */

.share-icon {
    width: 28px;
    height: 28px;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-icon {
    background: var(--gradient-primary);
    border-radius: var(--radius-pill);
}

.share-icon svg {
    width: 13px;
    height: 13px;
}

.share-icon svg {
    color: var(--color-black);
}

.share-icon svg {
    display: block;
}


/* ==================================================
   LABEL
================================================== */

.share-label {
    white-space: nowrap;
}


/* ==================================================
   ACTIVE
================================================== */

.share-button:active {
    transform: translateY(0);
}


/* ==================================================
   DISABLED
================================================== */

.share-button:disabled {
    opacity: .65;
}

.share-button:disabled {
    cursor: default;
}

.share-button:disabled {
    transform: none;
}


/* ==================================================
   RESPONSIVE
================================================== */

@media screen and (max-width: 768px) {

    .share-button {
        min-height: 36px;
    }

    .share-button {
        padding-right: 12px;
    }

}


/* ==================================================
   BUTTON — HOVERBACKGROUND
================================================== */

.share-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform .25s cubic-bezier(.22, 1, .36, 1),
        box-shadow .3s ease,
        border-color .3s ease,
        background-color .3s ease;
}

.share-button > * {
    position: relative;
    z-index: 1;
}

.share-button:focus-visible {
    outline: 2px solid var(--color-primary-light, #e6cd8e);
    outline-offset: 5px;
}

@media screen and (min-width: 1024px) {

    .share-button::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background: linear-gradient(
            110deg,
            transparent 20%,
            rgba(255, 255, 255, .28) 50%,
            transparent 80%
        );
        transform: translateX(-140%) skewX(-18deg);
        transition: transform .65s cubic-bezier(.22, 1, .36, 1);
    }

    @media (hover: hover) and (pointer: fine) {

        .share-button:not(:disabled):hover {
            box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
        }

        .share-button:not(:disabled):hover::before {
            transform: translateX(140%) skewX(-18deg);
        }

    }

    .share-button:not(:disabled):active {
        transform: translateY(0) scale(.98);
    }

}


/* ==================================================
   MOUVEMENTS RÉDUITS
================================================== */

@media (prefers-reduced-motion: reduce) {

    .share-button,
    .share-button::before {
        transition: none;
    }

    .share-button::before {
        display: none;
    }

    .share-button:not(:disabled):hover,
    .share-button:not(:disabled):active {
        transform: none;
    }

}
