/* Frontend Satellite Button Styles - Multi Direction Support */
.aluna-satellite-wrapper {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dynamic Width/Height based on Size Classes */
.aluna-satellite-wrapper.sat-wrap-xs { width: 30px; height: 30px; }
.aluna-satellite-wrapper.sat-wrap-xs .sat-toggle-btn { font-size: 14px; }

.aluna-satellite-wrapper.sat-wrap-sm { width: 38px; height: 38px; }
.aluna-satellite-wrapper.sat-wrap-sm .sat-toggle-btn { font-size: 18px; }

.aluna-satellite-wrapper.sat-wrap-md { width: 46px; height: 46px; }
.aluna-satellite-wrapper.sat-wrap-md .sat-toggle-btn { font-size: 20px; }

.aluna-satellite-wrapper.sat-wrap-lg { width: 54px; height: 54px; }
.aluna-satellite-wrapper.sat-wrap-lg .sat-toggle-btn { font-size: 24px; }

.aluna-satellite-wrapper.sat-wrap-xl { width: 60px; height: 60px; }
.aluna-satellite-wrapper.sat-wrap-xl .sat-toggle-btn { font-size: 28px; }


/* Location Anchors */
.aluna-satellite-wrapper.sat-loc-bottom-right { bottom: 30px; right: 30px; }
.aluna-satellite-wrapper.sat-loc-bottom-left { bottom: 30px; left: 30px; }
.aluna-satellite-wrapper.sat-loc-top-right { top: 30px; right: 30px; }
.aluna-satellite-wrapper.sat-loc-top-left { top: 30px; left: 30px; }

/* Main Toggle Button */
.sat-toggle-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
    position: absolute;
    top: 0; left: 0;
}

.sat-toggle-btn:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transform: scale(1.05);
}

.aluna-satellite-wrapper.is-active .sat-toggle-btn {
    transform: rotate(45deg);
}

/* -- Callout Popup Design (Speech Bubble Style) -- */
.sat-callout {
    position: absolute;
    z-index: 100;
    padding: 12px 18px;
    border-radius: 10px;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: 500;
    /* Use drop-shadow filter so the triangle tail casts a seamless shadow */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    top: 50%; /* Force vertical center relative to main button */
    transform: translateY(-50%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sat-callout.is-visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) scale(1);
    animation: satCalloutFloat 2.5s infinite ease-in-out;
    animation-delay: 0.5s; 
}

/* Keep Y-axis centered (-50%) while floating */
@keyframes satCalloutFloat {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(calc(-50% - 6px)) scale(1); }
}

.sat-callout-close {
    background: none;
    border: none;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sat-callout-close:hover {
    opacity: 1;
}

/* Position Callouts relative to main anchor points & Add Tails */
.sat-loc-bottom-right .sat-callout, .sat-loc-top-right .sat-callout {
    right: 100%;
    margin-right: 20px;
    transform-origin: right center;
}
/* CSS triangle pointer pointing RIGHT (Ekor Callout) */
.sat-loc-bottom-right .sat-callout::after, .sat-loc-top-right .sat-callout::after {
    content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
    border-width: 6px 0 6px 8px; border-style: solid;
    /* Picks up background color from inline css var --sat-callout-bg */
    border-color: transparent transparent transparent var(--sat-callout-bg); 
}

.sat-loc-bottom-left .sat-callout, .sat-loc-top-left .sat-callout {
    left: 100%;
    margin-left: 20px;
    transform-origin: left center;
}
/* CSS triangle pointer pointing LEFT (Ekor Callout) */
.sat-loc-bottom-left .sat-callout::after, .sat-loc-top-left .sat-callout::after {
    content: ''; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
    border-width: 6px 8px 6px 0; border-style: solid;
    border-color: transparent var(--sat-callout-bg) transparent transparent; 
}


/* -- Directional Menu Wrappers -- */
.sat-menu {
    position: absolute;
    display: flex;
    gap: 12px;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
}

.sat-menu-up {
    bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(20px);
    flex-direction: column-reverse;
    margin-bottom: 15px;
}
.aluna-satellite-wrapper.is-active .sat-menu-up {
    transform: translateX(-50%) translateY(0);
    opacity: 1; pointer-events: all;
}

.sat-menu-down {
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(-20px);
    flex-direction: column;
    margin-top: 15px;
}
.aluna-satellite-wrapper.is-active .sat-menu-down {
    transform: translateX(-50%) translateY(0);
    opacity: 1; pointer-events: all;
}

.sat-menu-left {
    right: 100%; top: 50%;
    transform: translateY(-50%) translateX(20px);
    flex-direction: row-reverse;
    margin-right: 15px;
}
.aluna-satellite-wrapper.is-active .sat-menu-left {
    transform: translateY(-50%) translateX(0);
    opacity: 1; pointer-events: all;
}

.sat-menu-right {
    left: 100%; top: 50%;
    transform: translateY(-50%) translateX(-20px);
    flex-direction: row;
    margin-left: 15px;
}
.aluna-satellite-wrapper.is-active .sat-menu-right {
    transform: translateY(-50%) translateX(0);
    opacity: 1; pointer-events: all;
}

/* -- Individual Satellite Items (Dynamic Sizes) -- */
.sat-item {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, filter 0.2s ease;
    position: relative;
}

.sat-item-size-xs { width: 30px; height: 30px; font-size: 14px; }
.sat-item-size-sm { width: 38px; height: 38px; font-size: 18px; }
.sat-item-size-md { width: 46px; height: 46px; font-size: 20px; }
.sat-item-size-lg { width: 54px; height: 54px; font-size: 24px; }
.sat-item-size-xl { width: 60px; height: 60px; font-size: 28px; }

.sat-item:hover {
    transform: scale(1.15) !important;
    filter: brightness(1.1);
}

/* Tooltip Default Styles */
.sat-item::after {
    content: attr(data-title);
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    font-family: sans-serif;
    font-weight: 500;
}

.sat-item:hover::after {
    opacity: 1;
}

.sat-loc-bottom-right .sat-item::after, .sat-loc-top-right .sat-item::after {
    right: 100%; margin-right: 15px; top: 50%; transform: translateY(-50%) translateX(10px);
}
.sat-loc-bottom-right .sat-item:hover::after, .sat-loc-top-right .sat-item:hover::after {
    transform: translateY(-50%) translateX(0);
}

.sat-loc-bottom-left .sat-item::after, .sat-loc-top-left .sat-item::after {
    left: 100%; margin-left: 15px; top: 50%; transform: translateY(-50%) translateX(-10px);
}
.sat-loc-bottom-left .sat-item:hover::after, .sat-loc-top-left .sat-item:hover::after {
    transform: translateY(-50%) translateX(0);
}

.sat-menu-left .sat-item::after, .sat-menu-right .sat-item::after {
    top: auto; transform: none; bottom: 100%; margin-bottom: 15px; left: 50%; right: auto; margin-right: auto; margin-left: auto; transform: translateX(-50%) translateY(10px) !important;
}
.sat-menu-left .sat-item:hover::after, .sat-menu-right .sat-item:hover::after {
    transform: translateX(-50%) translateY(0) !important;
}