/**
 * DYS Replay 录制器样式
 * 前端录制时的UI组件（如果有）
 *
 * @package DYS_Replay
 * @version 1.0.0
 */

/* 录制状态指示器（可选显示在页面角落） */
.dys-recording-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.dys-recording-indicator:hover {
    opacity: 1 !important;
}

/* 录制红点动画 */
.dys-recording-dot {
    width: 10px;
    height: 10px;
    background-color: #ff4444;
    border-radius: 50%;
    animation: dys-pulse-dot 1.5s ease-in-out infinite;
}

@keyframes dys-pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
    }
}

/* 录制时间 */
.dys-recording-time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* 隐藏的录制指示器（默认不显示） */
.dys-recording-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 敏感输入框遮罩样式（回放时使用） */
.dys-masked-input {
    position: relative;
}

.dys-masked-input::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        #ccc,
        #ccc 4px,
        #fff 4px,
        #fff 8px
    );
    pointer-events: none;
}

/* 错误提示样式 */
.dys-error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 12px 20px;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: dys-slide-in-right 0.3s ease-out;
}

@keyframes dys-slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 成功提示 */
.dys-success-toast {
    background-color: #28a745;
}

/* 加载覆盖层 */
.dys-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99997;
}

/* 加载旋转动画 */
.dys-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: dys-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* 调试模式下的控制台样式增强（仅在debugMode开启时生效） */
body.dys-debug-mode .dys-recording-indicator {
    background: rgba(40, 167, 69, 0.9);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .dys-recording-indicator {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .dys-recording-dot {
        width: 8px;
        height: 8px;
    }
}
