/* Container Positioning */
#float-action-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2147483647; /* Max Safe Integer to float above everything */
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: "Roboto", sans-serif;
}
/* Common Button Styling */
.float-btn {
    width: 48px;
    height: 48px;
    background-color: #0068B6;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}
.float-btn i { font-size: 18px; margin-bottom: 2px; }
.float-btn span { font-size: 10px; transform: scale(0.9); }
.float-btn:hover { opacity: 0.7; color: #fff; }
.float-btn img {
    width: 24px;
    margin: 0;
}
/* Share Panel Styling */
.share-wrapper { position: relative; }
.share-panel {
    display: none;
    position: absolute;
    bottom: 0;
    right: 60px;
    width: 180px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
}
/* EN version specific styling */
.share-panel.share-panel-en {
    width: 140px;
    bottom: 5px;
}
/* Bridge to fix hover gap */
.share-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: -15px;
    height: 100%;
    width: 20px;
    background: transparent;
}
/* Show panel on hover/active */
.share-wrapper:hover .share-panel,
.share-wrapper.active .share-panel {
    display: block;
    animation: fadeIn 0.3s;
}
.panel-header {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.panel-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 10px 0;
}
/* QR Code Canvas */
#share-qrcode canvas {
    width: 130px;
    height: 130px;
    display: block;
    margin: 0 auto;
}
/* Action Buttons Row */
.share-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 0; /* Default (CN) */
}
/* Apply margin only when it is English version */
.share-panel.share-panel-en .share-actions {
    margin-top: 5px;
}
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0068B6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.2s;
    text-decoration: none; /* Ensure no underline for links */
}
.action-btn:hover { opacity: 0.7; color: #fff; }
/* Scroll Top Wrapper - Hidden by default */
.top-wrapper {
    display: none;
}
/* Toast Notification */
#toast-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 2147483648; /* Higher than container */
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 1200px) {
    .float-btn {
        width: 40px;
        height: 40px;
    }
    .float-btn i {
        font-size: 16px;
    }
    .float-btn img {
        width: 20px;
    }
    .share-panel {
        padding: 10px;
    }
    #float-action-container {
        z-index: 9997; /* float under mobile menu */
    }
}
