/* Back-to-top styles
   Version: 3.0.1
   Date: 2026-03-18
   Author: Daniel Valverde
   Mutually exclusive: (1) body has 'share-back-to-top' → share-top-fixed-actions bar;
                       (2) body does not → #back-to-top-btn (default). Neither if custom selectors present.
*/
/* Default single back-to-top button: used when body does NOT have 'share-back-to-top' (and no custom bar). */
.cmp-container #back-to-top-btn {
    position: fixed;
    bottom: 44px;
    right: max(36px, calc(50vw - 790px));
    left: auto;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 48px;
    width: 0;
    height: 0;
    opacity: 0;
    font-size: 16px;
    background-color: #0a60ff;
    color: #ffffff;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out, right 0.3s ease-in-out;
}

.cmp-container #back-to-top-btn .back-to-top-btn-icon {
    flex-shrink: 0;
    width: 0;
    height: 0;
    opacity: 0;
    display: block;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
}

.cmp-container #back-to-top-btn.show {
    opacity: 1;
    width: 40px;
    height: 40px;
    transform: scale(1);
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmp-container #back-to-top-btn.show .back-to-top-btn-icon {
    opacity: 1;
    width: 20px;
    height: 20px;
}

.cmp-container #back-to-top-btn.show:hover {
    transform: scale(1.15);
}

.cmp-container #back-to-top-btn.show:focus-visible {
    outline: 2px solid #0a60ff;
    outline-offset: 2px;
}

@media (max-width: 400px) {
    .cmp-container #back-to-top-btn {
        bottom: 24px;
        right: 24px;
    }
}

/* ---------------------------------------------------------------------------
   share-top-fixed-actions bar (share + back-to-top) - when body HAS 'share-back-to-top'
   --------------------------------------------------------------------------- */
.cmp-container .share-top-fixed-actions {
    position: fixed;
    bottom: 44px;
    right: 44px;
    width: 0;
    height: 0;
    opacity: 0;
    z-index: 9;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    overflow: visible;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
}

.cmp-container .share-top-fixed-actions .share-top-share-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu {
    display: flex;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    width: 128px;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
    padding: 8px 0;
    background-color: #FFFFFF;
    border: 1px solid #E1E6EB;
    border-radius: 8px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
    list-style: none;
    transform-origin: bottom left;
    transform: scaleY(0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out, visibility 0s linear 0.5s;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu.is-open {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out, visibility 0s linear 0s;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option {
    flex: 0 0 auto;
    width: 100%;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option a,
.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option button.share-top-qrcode-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
    width: 100%;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    justify-content: flex-start;
    box-shadow: unset;
    border-radius: unset;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option a:hover,
.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option button.share-top-qrcode-link:hover {
    background-color: rgba(10, 96, 255, 0.08);
    color: #0A60FF;
    text-decoration: none;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option a:focus-visible,
.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option button.share-top-qrcode-link:focus-visible {
    outline: 2px solid #0A60FF;
    outline-offset: 2px;
}

.cmp-container .share-top-fixed-actions .share-top-share-menu .share-top-share-option svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.cmp-container .share-top-fixed-actions button {
    width: 0;
    height: 0;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid #0A60FF;
    border-radius: 48px;
    background-color: #FFFFFF;
    color: #000000;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out, color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.cmp-container .share-top-fixed-actions button .back-to-top-link-icon,
.cmp-container .share-top-fixed-actions button .share-link-icon {
    flex-shrink: 0;
    width: 0;
    height: 0;
    opacity: 0;
    display: block;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
}

.cmp-container .share-top-fixed-actions button .share-top-share-link-text {
    overflow: hidden;
    width: 0;
    height: 0;
    opacity: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out, overflow 0.5s ease-in-out;
}

.cmp-container .share-top-fixed-actions.show {
    opacity: 1;
    width: 188px;
    height: 44px;
}

.cmp-container .share-top-fixed-actions.show button {
    width: auto;
    height: 44px;
    opacity: 1;
}

.cmp-container .share-top-fixed-actions.show button .back-to-top-link-icon,
.cmp-container .share-top-fixed-actions.show button .share-link-icon {
    opacity: 1;
    width: 20px;
    height: 20px;
}

.cmp-container .share-top-fixed-actions.show button .share-top-share-link-text {
    opacity: 1;
    width: 4.5em;
    height: 20px;
}

.cmp-container .share-top-fixed-actions.show button#back-to-top-link {
    width: 64px;
    height: 44px;
}

.cmp-container .share-top-fixed-actions.show button#back-to-top-link:hover {
    background-color: #0A60FF;
    color: #FFFFFF;
}

.cmp-container .share-top-fixed-actions.show button#back-to-top-link:focus-visible {
    outline: 2px solid #0A60FF;
    outline-offset: 2px;
}

.cmp-container .share-top-fixed-actions.show button#share-top-share-link {
    width: 116px;
    height: 44px;
}

.cmp-container .share-top-fixed-actions.show button#share-top-share-link:hover {
    background-color: #124FC9;
    border-color: #124FC9;
}

.cmp-container .share-top-fixed-actions.show button#share-top-share-link:focus-visible {
    outline: 2px solid #0A60FF;
    outline-offset: 2px;
}

.cmp-container .share-top-fixed-actions button#share-top-share-link {
    background-color: #0A60FF;
    color: #FFFFFF;
}

@media (min-width: 1750px) {
    .cmp-container .share-top-fixed-actions {
        right: calc(50vw - 926px);
    }
}

@media (max-width: 400px) {
    .cmp-container .share-top-fixed-actions {
        bottom: 24px;
        right: 24px;
    }
}

/* QR code modal (used from share menu) */
.share-top-qr-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-top-qr-modal.is-open {
    display: flex;
}

.share-top-qr-modal .share-top-qr-modal__inner {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
}

.share-top-qr-modal .share-top-qr-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: #000000;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-top-qr-modal .share-top-qr-modal__close:hover,
.share-top-qr-modal .share-top-qr-modal__close:focus-visible {
    background-color: rgba(10, 96, 255, 0.08);
    color: #0A60FF;
}

.share-top-qr-modal .share-top-qr-modal__close:focus-visible {
    outline: 2px solid #0A60FF;
    outline-offset: 2px;
}

.share-top-qr-modal .share-top-qr-modal__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 280px;
    max-height: 70vh;
    object-fit: contain;
}