/* ====== 快捷入口插件样式 ====== */

/* 导航栏图标 hover */
#shortcut-entry-nav-icon .rong-nav-icon.hover { display: none; }
#shortcut-entry-nav-icon .rong-nav-icon:not(.hover) { display: block; }
#shortcut-entry-nav-icon:hover .rong-nav-icon.hover { display: block; }
#shortcut-entry-nav-icon:hover .rong-nav-icon:not(.hover) { display: none; }

/* 弹出面板 */
.shortcut-panel {
    position: fixed;
    z-index: 99999;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
    padding: 8px;
    min-width: 180px;
    opacity: 0;
    transform: translateX(-8px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.shortcut-panel.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

/* 面板标题 */
.shortcut-panel-title {
    font-size: 11px;
    color: #999;
    padding: 4px 10px 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
    user-select: none;
}

/* 快捷项 */
.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}
.shortcut-item:hover {
    background: #f0f4ff;
}
.shortcut-item:active {
    background: #e0eaff;
}

/* 图标容器 */
.shortcut-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.shortcut-item:hover .shortcut-item-icon {
    transform: scale(1.08);
}
.shortcut-item-icon svg {
    width: 18px;
    height: 18px;
}

/* 文字区域 */
.shortcut-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.shortcut-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.3;
}
.shortcut-item-desc {
    font-size: 11px;
    color: #999;
    line-height: 1.3;
}

/* 暗色模式适配 —— 使用 html[data-theme="dark"]，与 dark-mode-toggle 插件一致 */
html[data-theme="dark"] .shortcut-panel {
    background: #2f2f2f;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .shortcut-panel-title {
    color: #8a8a8a;
}
html[data-theme="dark"] .shortcut-item:hover {
    background: #3a3a3a;
}
html[data-theme="dark"] .shortcut-item:active {
    background: #444444;
}
html[data-theme="dark"] .shortcut-item-name {
    color: #d4d4d4;
}
html[data-theme="dark"] .shortcut-item-desc {
    color: #8a8a8a;
}

/* ====== 剪贴板检测 Toast 弹框 ====== */

.shortcut-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    max-width: 380px;
    overflow: hidden;

    /* 入场动画 - 从右下滑入 */
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.shortcut-toast.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.shortcut-toast.hiding {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
}

/* Toast 图标 */
.shortcut-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Toast 文字区域 */
.shortcut-toast-body {
    flex: 1;
    min-width: 0;
}
.shortcut-toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    white-space: nowrap;
}
.shortcut-toast-detail {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* Toast 按钮区域 */
.shortcut-toast-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.shortcut-toast-btn {
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
}
.shortcut-toast-btn.primary {
    background: #4E8BF7;
    color: #fff;
}
.shortcut-toast-btn.primary:hover {
    background: #3a7ae8;
    transform: scale(1.03);
}
.shortcut-toast-btn.primary:active {
    background: #2d6ad8;
    transform: scale(0.98);
}
.shortcut-toast-btn.dismiss {
    background: transparent;
    color: #999;
}
.shortcut-toast-btn.dismiss:hover {
    background: #f0f0f0;
    color: #666;
}

/* Toast 底部进度条（自动消失倒计时） */
.shortcut-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #4E8BF7, #2B6BFF);
    border-radius: 0 0 12px 12px;
    width: 100%;
    animation: shortcut-toast-countdown 8s linear forwards;
}
@keyframes shortcut-toast-countdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* ====== Toast 暗色模式 ====== */
html[data-theme="dark"] .shortcut-toast {
    background: #2f2f2f;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .shortcut-toast-title {
    color: #d4d4d4;
}
html[data-theme="dark"] .shortcut-toast-detail {
    color: #8a8a8a;
}
html[data-theme="dark"] .shortcut-toast-btn.dismiss:hover {
    background: #3a3a3a;
    color: #bbb;
}
