/*----------------------------------------*/
/*  Share widget (shareon.js)
/*----------------------------------------*/

/* Floating "Share this page" button
------------------------------------------*/
.xc-share {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 98;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.xc-share__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 22px;
    background: var(--xoomcare-base, #b7171d);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(3, 4, 28, 0.3);
    transition: transform 0.2s, background-color 0.2s;
    border: 1px solid #ffb2b2;
}

.xc-share__toggle:hover,
.xc-share__toggle:focus-visible {
    color: #fff;
    transform: translateY(-2px);
}

.xc-share__toggle i {
    font-size: 16px;
}

.xc-share__panel {
    order: -1;
    width: 188px;
    padding: 7px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(3, 4, 28, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.xc-share.is-open .xc-share__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.xc-share__panel .shareon {
    text-align: left;
}

/* Inline "Share this link" (WYSIWYG content)
------------------------------------------*/
.xc-inline-share {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 6px;
}

.xc-inline-share__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid rgba(3, 4, 28, 0.12);
    border-radius: 14px;
    background: #f5f5f7;
    color: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.xc-inline-share__toggle:hover,
.xc-inline-share__toggle:focus-visible {
    background: #ececf0;
    border-color: rgba(3, 4, 28, 0.2);
}

/* Floating popover so the buttons never disturb the text flow */
.xc-inline-share__buttons {
    position: absolute;
    left: 0;
    bottom: calc(100% + 9px);
    z-index: 60;
    width: max-content;
    padding: 5px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(3, 4, 28, 0.18);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.xc-inline-share.is-open .xc-inline-share__buttons {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Caret */
.xc-inline-share__buttons::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 16px;
    border: 6px solid transparent;
    border-top-color: #fff;
}

/* Flipped to the right edge when the popover would leave the viewport */
.xc-inline-share__buttons--align-right {
    left: auto;
    right: 0;
}

.xc-inline-share__buttons--align-right::after {
    left: auto;
    right: 16px;
}

/* Dropped below the chip when there is no room above */
.xc-inline-share__buttons--below {
    top: calc(100% + 9px);
    bottom: auto;
}

.xc-inline-share__buttons--below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #fff;
}

.xc-inline-share .shareon {
    display: block;
}

.xc-inline-share .shareon > * {
    height: 20px;
    min-width: 14px;
    padding: 5px 8px;
    margin: 2px;
}

@media (max-width: 575px) {
    .xc-share {
        right: 15px;
        bottom: 15px;
    }

    .xc-share__toggle {
        width: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .xc-share__toggle span {
        display: none;
    }
}

@media print {
    .xc-share {
        display: none;
    }
}
