/* Floating Share Button - Orbit Style */
.floating-share {
    position: fixed;
    right: 24px;
    top: 25vh;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-share.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Main trigger button */
.floating-share__trigger {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e97a9c;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233, 122, 156, 0.4);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.floating-share__trigger:hover {
    background: #d4648a;
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(212, 100, 138, 0.45);
}

.floating-share__trigger-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Curved rotating text around the button */
.floating-share__curved-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%);
    animation: floatingShareRotate 12s linear infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.floating-share__curved-text text {
    fill: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes floatingShareRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Orbit container - holds all icons, centered on trigger */
.floating-share__orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    pointer-events: none;
}

/* Orbit icons - positioned via CSS custom properties */
.floating-share__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    text-decoration: none;
    opacity: 0;
    transform: scale(0) rotate(0deg) translateX(0);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 5;
}

/* Open state - icons fly out to orbit positions */
.floating-share.orbit-open .floating-share__icon {
    opacity: 1;
    pointer-events: auto;
}

.floating-share.orbit-open .floating-share__icon:nth-child(1) {
    transform: rotate(-90deg) translateX(75px) rotate(90deg) scale(1);
    transition-delay: 0s;
}
.floating-share.orbit-open .floating-share__icon:nth-child(2) {
    transform: rotate(-30deg) translateX(75px) rotate(30deg) scale(1);
    transition-delay: 0.04s;
}
.floating-share.orbit-open .floating-share__icon:nth-child(3) {
    transform: rotate(30deg) translateX(75px) rotate(-30deg) scale(1);
    transition-delay: 0.08s;
}
.floating-share.orbit-open .floating-share__icon:nth-child(4) {
    transform: rotate(90deg) translateX(75px) rotate(-90deg) scale(1);
    transition-delay: 0.12s;
}
.floating-share.orbit-open .floating-share__icon:nth-child(5) {
    transform: rotate(150deg) translateX(75px) rotate(-150deg) scale(1);
    transition-delay: 0.16s;
}
.floating-share.orbit-open .floating-share__icon:nth-child(6) {
    transform: rotate(210deg) translateX(75px) rotate(-210deg) scale(1);
    transition-delay: 0.2s;
}

/* Closing stagger (reverse) */
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(6) { transition-delay: 0s; }
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(5) { transition-delay: 0.03s; }
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(4) { transition-delay: 0.06s; }
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(3) { transition-delay: 0.09s; }
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(2) { transition-delay: 0.12s; }
.floating-share:not(.orbit-open) .floating-share__icon:nth-child(1) { transition-delay: 0.15s; }

.floating-share__icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-share__icon:hover .floating-share__icon-circle {
    transform: scale(1.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.floating-share__icon-circle svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Icon colors */
.floating-share__icon--sms .floating-share__icon-circle       { background: #53242c; }
.floating-share__icon--facebook .floating-share__icon-circle   { background: #1877F2; }
.floating-share__icon--whatsapp .floating-share__icon-circle   { background: #25D366; }
.floating-share__icon--email .floating-share__icon-circle      { background: #c9a87c; }
.floating-share__icon--twitter .floating-share__icon-circle    { background: #000; }
.floating-share__icon--copy .floating-share__icon-circle       { background: #e97a9c; }

/* Copy tooltip */
.floating-share__tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #53242c;
    color: #faf8f5;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-share__tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.floating-share__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #53242c;
}

/* Hide curved text when orbit is open */
.floating-share.orbit-open .floating-share__curved-text {
    opacity: 0;
}

.floating-share.orbit-open .floating-share__trigger {
    background: #d4648a;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-share {
        right: 16px;
        top: 30vh;
    }

    .floating-share__trigger {
        width: 54px;
        height: 54px;
    }

    .floating-share__orbit {
        width: 54px;
        height: 54px;
    }

    .floating-share__trigger-text {
        font-size: 10px;
    }

    .floating-share__curved-text {
        width: 86px;
        height: 86px;
    }

    .floating-share__curved-text text {
        font-size: 8.5px;
    }

    .floating-share__icon {
        width: 38px;
        height: 38px;
        margin: -19px 0 0 -19px;
    }

    .floating-share__icon-circle {
        width: 38px;
        height: 38px;
    }

    .floating-share__icon-circle svg {
        width: 18px;
        height: 18px;
    }

    .floating-share.orbit-open .floating-share__icon:nth-child(1) { transform: rotate(-90deg) translateX(65px) rotate(90deg) scale(1); }
    .floating-share.orbit-open .floating-share__icon:nth-child(2) { transform: rotate(-30deg) translateX(65px) rotate(30deg) scale(1); }
    .floating-share.orbit-open .floating-share__icon:nth-child(3) { transform: rotate(30deg) translateX(65px) rotate(-30deg) scale(1); }
    .floating-share.orbit-open .floating-share__icon:nth-child(4) { transform: rotate(90deg) translateX(65px) rotate(-90deg) scale(1); }
    .floating-share.orbit-open .floating-share__icon:nth-child(5) { transform: rotate(150deg) translateX(65px) rotate(-150deg) scale(1); }
    .floating-share.orbit-open .floating-share__icon:nth-child(6) { transform: rotate(210deg) translateX(65px) rotate(-210deg) scale(1); }
}

@media (max-width: 480px) {
    .floating-share {
        right: 12px;
    }
}
