/**
 * PixelShare 右侧跟随工具条样式
 * 
 * @package PixelShare
 * @author 猫大大
 * @version 1.0.0
 */

/* 右侧跟随工具条容器 */
.floating-toolbar {
    position: fixed;
    right: 70px;
    top: 80%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    transition: all 0.3s ease;
}

/* 工具条项目通用样式 */
.floating-toolbar .toolbar-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    color: #666;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* 工具条项目图标 */
.floating-toolbar .toolbar-item i {
    font-size: 20px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

/* 工具条项目文字 */
.floating-toolbar .toolbar-item span {
    font-size: 10px;
    transition: all 0.3s ease;
}

/* 工具条项目悬停效果 */
.floating-toolbar .toolbar-item:hover {
    background-color: var(--theme-color, #ff6800);
    color: #fff;
    transform: translateY(-3px);
}

/* 工具条项目点击效果 */
.floating-toolbar .toolbar-item:active {
    transform: scale(0.95) translateY(-3px);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* 签到按钮已签到状态 */
.floating-toolbar .checkin-btn.checked {
    background-color: #8e8e8e;
    color: #fff;
}

/* 签到按钮加载状态 */
.floating-toolbar .checkin-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.floating-toolbar .checkin-btn.loading:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 1s infinite linear;
    box-sizing: border-box;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 767px) {
    .floating-toolbar {
        right: 15px;
        flex-direction: column; /* 确保移动端也是竖向排列 */
    }
    
    .floating-toolbar .toolbar-item {
        width: 45px;
        height: 45px;
    }
    
    /* 当存在底部导航栏时的位置调整 */
    body.has-mobile-tabbar .floating-toolbar {
        bottom: 80px;
        top: auto;
        transform: none;
        flex-direction: column; /* 改为竖向排列 */
        right: 15px; /* 保持右侧对齐 */
    }
}

/* 深色模式适配 */
[data-theme="dark"] .floating-toolbar .toolbar-item,
.dark-theme .floating-toolbar .toolbar-item {
    background-color: #333;
    color: #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .floating-toolbar .toolbar-item:hover,
.dark-theme .floating-toolbar .toolbar-item:hover {
    background-color: var(--theme-color, #ff6800);
    color: #fff;
}

/* 在PC端隐藏签到按钮 */
@media (min-width: 768px) {
    .floating-toolbar .checkin-btn {
        display: none;
    }
}