:root {
    --allplayy-share-size: 34px;
    --allplayy-share-gap: 8px;
    --allplayy-share-edge: max(8px, env(safe-area-inset-right, 0px));
    --allplayy-share-space: calc(var(--allplayy-share-size) + var(--allplayy-share-edge) + 10px);
}

.allplayy-social-share {
    position: fixed;
    top: 50%;
    right: var(--allplayy-share-edge);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--allplayy-share-gap);
    width: var(--allplayy-share-size);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: translateY(-50%);
}

.allplayy-social-share .allplayy-share-icon {
    display: flex;
    flex: 0 0 var(--allplayy-share-size);
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: var(--allplayy-share-size);
    height: var(--allplayy-share-size);
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 7px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--allplayy-share-color);
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, filter .15s ease;
}

.allplayy-share-icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.allplayy-share-whatsapp { --allplayy-share-color: #25d366; }
.allplayy-share-telegram { --allplayy-share-color: #229ed9; }
.allplayy-share-facebook { --allplayy-share-color: #1877f2; }
.allplayy-share-x { --allplayy-share-color: #000; }
.allplayy-share-linkedin { --allplayy-share-color: #0a66c2; }
.allplayy-share-copy { --allplayy-share-color: #7c3aed; }
.allplayy-share-icon:focus-visible { outline: 2px solid #152b4b; outline-offset: 3px; }
@media (hover: hover) {
    .allplayy-share-icon:hover { transform: translateX(-2px); filter: brightness(.9); }
}

.allplayy-share-status {
    position: fixed;
    right: calc(var(--allplayy-share-space) + 6px);
    bottom: 82px;
    z-index: 10002;
    max-width: min(260px, calc(100vw - var(--allplayy-share-space) - 24px));
    margin: 0;
    padding: 9px 13px;
    border-radius: 8px;
    background: #17243d;
    color: #fff;
    font: 600 13px/1.4 Arial, sans-serif;
    overflow-wrap: anywhere;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.allplayy-share-status.is-visible { opacity: 1; }

/* Keep content and fixed download/menu controls out of the transparent rail gutter. */
@media (max-width: 1280px) {
    body:has(.allplayy-social-share), body.allplayy-has-share {
        box-sizing: border-box;
        max-width: 100%;
        padding-right: var(--allplayy-share-space) !important;
    }
    body:has(.allplayy-social-share) .kg-mobile-sticky,
    body.allplayy-has-share .kg-mobile-sticky {
        right: calc(var(--allplayy-share-space) + 10px);
    }
    body:has(.allplayy-social-share) .back-to-top.is-floating,
    body.allplayy-has-share .back-to-top.is-floating {
        right: calc(var(--allplayy-share-space) + 10px);
    }
}
@media (max-width: 767px) {
    :root { --allplayy-share-size: 28px; --allplayy-share-gap: 6px; --allplayy-share-edge: max(6px, env(safe-area-inset-right, 0px)); }
    .allplayy-social-share .allplayy-share-icon { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .allplayy-share-icon, .allplayy-share-status { transition: none; }
}
@media print {
    .allplayy-social-share, .allplayy-share-status { display: none !important; }
    body:has(.allplayy-social-share), body.allplayy-has-share { padding-right: 0 !important; }
}
