/* Floating Contact Button - Frontend Styles */

#fcb-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Position Classes */
#fcb-container.fcb-bottom-right {
    bottom: 20px;
    right: 20px;
}

#fcb-container.fcb-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Size Classes */
#fcb-container.fcb-size-small .fcb-main-btn {
    width: 50px;
    height: 50px;
}

#fcb-container.fcb-size-small .fcb-main-btn svg {
    width: 22px;
    height: 22px;
}

#fcb-container.fcb-size-small .fcb-btn {
    width: 44px;
    height: 44px;
}

#fcb-container.fcb-size-small .fcb-btn svg {
    width: 20px;
    height: 20px;
}

#fcb-container.fcb-size-medium .fcb-main-btn {
    width: 60px;
    height: 60px;
}

#fcb-container.fcb-size-medium .fcb-main-btn svg {
    width: 26px;
    height: 26px;
}

#fcb-container.fcb-size-medium .fcb-btn {
    width: 50px;
    height: 50px;
}

#fcb-container.fcb-size-medium .fcb-btn svg {
    width: 22px;
    height: 22px;
}

#fcb-container.fcb-size-large .fcb-main-btn {
    width: 70px;
    height: 70px;
}

#fcb-container.fcb-size-large .fcb-main-btn svg {
    width: 30px;
    height: 30px;
}

#fcb-container.fcb-size-large .fcb-btn {
    width: 56px;
    height: 56px;
}

#fcb-container.fcb-size-large .fcb-btn svg {
    width: 26px;
    height: 26px;
}

/* Main Button */
#fcb-container .fcb-main-btn {
    background-color: var(--fcb-main-color, #25D366) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
}

#fcb-container .fcb-main-btn:hover,
#fcb-container .fcb-main-btn:focus,
#fcb-container .fcb-main-btn:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background-color: var(--fcb-main-color, #25D366) !important;
    outline: none;
    border-radius: 50% !important;
}

.fcb-main-btn svg {
    color: var(--fcb-icon-color, #ffffff);
    transition: all 0.3s ease;
    position: absolute;
}

.fcb-main-btn .fcb-icon-open {
    opacity: 1;
    transform: rotate(0deg);
}

.fcb-main-btn .fcb-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}

.fcb-main-btn.fcb-active .fcb-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.fcb-main-btn.fcb-active .fcb-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* Sub Buttons Container - Vertical Style (Default) */
#fcb-container.fcb-style-vertical #fcb-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

#fcb-container.fcb-style-vertical #fcb-buttons.fcb-buttons-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

#fcb-container.fcb-style-vertical #fcb-buttons.fcb-buttons-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

/* Sub Buttons Container - Fan Style (Sunburst) */
#fcb-container.fcb-style-fan {
    flex-direction: row;
    align-items: flex-end;
}

#fcb-container.fcb-style-fan #fcb-buttons {
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    transition: none;
    /* Center on the main button */
    bottom: 0;
    right: 0;
}

#fcb-container.fcb-style-fan #fcb-buttons .fcb-btn {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin: 0;
    /* Smaller buttons in fan mode */
    width: 42px !important;
    height: 42px !important;
}

#fcb-container.fcb-style-fan #fcb-buttons .fcb-btn svg {
    width: 20px !important;
    height: 20px !important;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-hidden {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-hidden .fcb-btn {
    opacity: 0;
    transform: translate(0, 0) scale(0.3) !important;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-visible .fcb-btn {
    opacity: 1;
}

/* Fan Style - Right Position - buttons positioned relative to main button center */
#fcb-container.fcb-style-fan.fcb-bottom-right #fcb-buttons {
    /* Position at center of main button (60px default / 2 = 30px) */
    bottom: 30px;
    right: 30px;
}

/* Fan arc - buttons spread in a SYMMETRIC quarter circle around main button */
/* Mathematically calculated: 90°, 135°, 180° with radius 70px (closer) */
/* Button size: 42px, so center offset: 21px */

/* Button 1: 90° (straight up) - center at (0, -70) → translate(-21, -91) */
#fcb-container.fcb-style-fan.fcb-bottom-right #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    transform: translate(-21px, -91px);
}

/* Button 2: 135° (diagonal) - center at (-49.5, -49.5) → translate(-71, -71) */
#fcb-container.fcb-style-fan.fcb-bottom-right #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    transform: translate(-71px, -71px);
}

/* Button 3: 180° (straight left) - center at (-70, 0) → translate(-91, -21) */
#fcb-container.fcb-style-fan.fcb-bottom-right #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    transform: translate(-91px, -21px);
}

/* Fan Style - Left Position */
#fcb-container.fcb-style-fan.fcb-bottom-left #fcb-buttons {
    bottom: 30px;
    left: 30px;
}

/* Button 1: 90° (straight up) - center at (0, -70) → translate(-21, -91) */
#fcb-container.fcb-style-fan.fcb-bottom-left #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    transform: translate(-21px, -91px);
}

/* Button 2: 45° (diagonal upper-right) - center at (49.5, -49.5) → translate(29, -71) */
#fcb-container.fcb-style-fan.fcb-bottom-left #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    transform: translate(29px, -71px);
}

/* Button 3: 0° (straight right) - center at (70, 0) → translate(49, -21) */
#fcb-container.fcb-style-fan.fcb-bottom-left #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    transform: translate(49px, -21px);
}

/* Size adjustments for fan style - center point adjustments */
#fcb-container.fcb-style-fan.fcb-size-small #fcb-buttons {
    /* Small button is 50px, so center at 25px */
    bottom: 25px;
    right: 25px;
}

#fcb-container.fcb-style-fan.fcb-size-small.fcb-bottom-left #fcb-buttons {
    left: 25px;
    right: auto;
}

/* Smaller spread for small buttons - symmetric arc with radius 55px */
/* Button 1: 90° - center at (0, -55) */
#fcb-container.fcb-style-fan.fcb-size-small #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    transform: translate(-21px, -76px);
}

/* Button 2: 135° - center at (-39, -39) */
#fcb-container.fcb-style-fan.fcb-size-small #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    transform: translate(-60px, -60px);
}

/* Button 3: 180° - center at (-55, 0) */
#fcb-container.fcb-style-fan.fcb-size-small #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    transform: translate(-76px, -21px);
}

#fcb-container.fcb-style-fan.fcb-size-large #fcb-buttons {
    /* Large button is 70px, so center at 35px */
    bottom: 35px;
    right: 35px;
}

#fcb-container.fcb-style-fan.fcb-size-large.fcb-bottom-left #fcb-buttons {
    left: 35px;
    right: auto;
}

/* Larger spread for large buttons - symmetric arc with radius 85px */
/* Button 1: 90° - center at (0, -85) */
#fcb-container.fcb-style-fan.fcb-size-large #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    transform: translate(-21px, -106px);
}

/* Button 2: 135° - center at (-60, -60) */
#fcb-container.fcb-style-fan.fcb-size-large #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    transform: translate(-81px, -81px);
}

/* Button 3: 180° - center at (-85, 0) */
#fcb-container.fcb-style-fan.fcb-size-large #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    transform: translate(-106px, -21px);
}

/* Fan animation delays */
#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    transition-delay: 0s;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    transition-delay: 0.05s;
}

#fcb-container.fcb-style-fan #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    transition-delay: 0.1s;
}

/* Sub Buttons */
.fcb-btn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fcb-bounce-in 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fcb-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fcb-btn svg {
    color: #ffffff;
}

/* WhatsApp Button */
.fcb-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.fcb-whatsapp:hover {
    background: linear-gradient(135deg, #2be06f 0%, #159a8a 100%);
}

/* Phone Button */
.fcb-phone {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.fcb-phone:hover {
    background: linear-gradient(135deg, #5bc75f 0%, #43a047 100%);
}

/* Email Button */
.fcb-email {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.fcb-email:hover {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
}

/* Animations */
@keyframes fcb-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger Animation for buttons - Vertical Style */
#fcb-container.fcb-style-vertical #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(1) {
    animation-delay: 0s;
}

#fcb-container.fcb-style-vertical #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(2) {
    animation-delay: 0.1s;
}

#fcb-container.fcb-style-vertical #fcb-buttons.fcb-buttons-visible .fcb-btn:nth-child(3) {
    animation-delay: 0.2s;
}

/* Fan Style - disable bounce animation */
#fcb-container.fcb-style-fan .fcb-btn {
    animation: none !important;
}

/* Pulse Animation for Main Button */
.fcb-main-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--fcb-main-color, #25D366);
    animation: fcb-pulse 2s infinite;
    z-index: -1;
}

@keyframes fcb-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Tooltip */
.fcb-btn::before {
    content: attr(title);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#fcb-container.fcb-bottom-right .fcb-btn::before {
    right: calc(100% + 10px);
}

#fcb-container.fcb-bottom-left .fcb-btn::before {
    left: calc(100% + 10px);
}

/* Hide tooltips in fan mode */
#fcb-container.fcb-style-fan .fcb-btn::before {
    display: none;
}

.fcb-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    #fcb-container.fcb-bottom-right,
    #fcb-container.fcb-bottom-left {
        bottom: 15px;
    }

    #fcb-container.fcb-bottom-right {
        right: 15px;
    }

    #fcb-container.fcb-bottom-left {
        left: 15px;
    }

    /* Smaller sizes on mobile */
    #fcb-container.fcb-size-large .fcb-main-btn {
        width: 60px;
        height: 60px;
    }

    #fcb-container.fcb-size-large .fcb-main-btn svg {
        width: 26px;
        height: 26px;
    }

    #fcb-container.fcb-size-large .fcb-btn {
        width: 50px;
        height: 50px;
    }

    .fcb-btn::before {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .fcb-main-btn {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .fcb-btn {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .fcb-main-btn,
    .fcb-btn,
    #fcb-buttons {
        transition: none;
    }

    .fcb-btn {
        animation: none;
    }

    .fcb-main-btn::after {
        animation: none;
    }
}

/* Back to Top Button */
#fcb-back-to-top {
    position: fixed;
    z-index: 999998;
    /* Below the contact button menu but above other content */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--fcb-main-color, #25D366);
    color: var(--fcb-icon-color, #ffffff);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#fcb-back-to-top.fcb-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#fcb-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#fcb-back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Position Classes for Back to Top */
#fcb-back-to-top.fcb-bottom-right {
    bottom: 20px;
    right: 20px;
}

#fcb-back-to-top.fcb-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Mobile Responsive for Back to Top */
@media (max-width: 768px) {

    #fcb-back-to-top.fcb-bottom-right,
    #fcb-back-to-top.fcb-bottom-left {
        bottom: 15px;
    }

    #fcb-back-to-top.fcb-bottom-right {
        right: 15px;
    }

    #fcb-back-to-top.fcb-bottom-left {
        left: 15px;
    }
}

/* Side Sticky Shortcode Area */
#fcb-side-sticky {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999997;
    display: flex;
    align-items: center;
}

#fcb-side-sticky.fcb-side-left {
    left: 0;
    flex-direction: row;
}

#fcb-side-sticky.fcb-side-right {
    right: 0;
    flex-direction: row-reverse;
}

/* Side Sticky Button */
.fcb-side-sticky-btn {
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 !important;
    margin: 0 !important;
}

#fcb-side-sticky.fcb-side-left .fcb-side-sticky-btn {
    border-radius: 0 12px 12px 0;
}

#fcb-side-sticky.fcb-side-right .fcb-side-sticky-btn {
    border-radius: 12px 0 0 12px;
}

.fcb-side-sticky-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.fcb-side-sticky-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Side Sticky Popup */
.fcb-side-sticky-popup {
    position: absolute;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 16px;
    min-width: 220px;
    width: auto;
    max-width: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: visible;
}

#fcb-side-sticky.fcb-side-left .fcb-side-sticky-popup {
    left: 55px;
    transform-origin: left center;
}

#fcb-side-sticky.fcb-side-right .fcb-side-sticky-popup {
    right: 55px;
    transform-origin: right center;
}

.fcb-side-sticky-popup.fcb-popup-open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    pointer-events: all;
}

/* Popup Content Styling */
.fcb-side-sticky-popup-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    overflow: visible;
}

/* Google Translate specific styles */
.fcb-side-sticky-popup-content .goog-te-gadget,
.fcb-side-sticky-popup-content .gtranslate_wrapper,
.fcb-side-sticky-popup-content .gt_selector,
.fcb-side-sticky-popup-content select,
.fcb-side-sticky-popup-content .VIpgJd-ZVi9od-l4eHX-hSRGPd {
    width: 100% !important;
    min-width: 180px !important;
}

.fcb-side-sticky-popup-content .goog-te-menu-frame {
    max-height: 300px !important;
}

/* Popup Arrow/Indicator */
.fcb-side-sticky-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

#fcb-side-sticky.fcb-side-left .fcb-side-sticky-popup::before {
    left: -8px;
    border-width: 8px 8px 8px 0;
    border-color: transparent #ffffff transparent transparent;
}

#fcb-side-sticky.fcb-side-right .fcb-side-sticky-popup::before {
    right: -8px;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #ffffff;
}

/* Button active state */
.fcb-side-sticky-btn.fcb-btn-active {
    transform: scale(1.1);
}

/* Mobile Responsive for Side Sticky */
@media (max-width: 768px) {
    .fcb-side-sticky-btn {
        width: 44px;
        height: 44px;
    }

    .fcb-side-sticky-btn svg {
        width: 20px;
        height: 20px;
    }

    .fcb-side-sticky-popup {
        min-width: 200px;
        width: auto;
        max-width: none;
        padding: 12px;
    }

    #fcb-side-sticky.fcb-side-left .fcb-side-sticky-popup {
        left: 48px;
    }

    #fcb-side-sticky.fcb-side-right .fcb-side-sticky-popup {
        right: 48px;
    }
}