/**
 * WooCommerce 登录购买限制 - 前端样式
 */

/* 登录提示通知 - 紫色调 */
.wlr-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    display: none; /* 隐藏横幅提示 */
}

.wlr-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.wlr-notice p {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wlr-notice-shop {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: none; /* 隐藏商店页面横幅 */
}

.wlr-notice-product {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: none; /* 隐藏产品页面横幅 */
}

/* 登录提示按钮 */
.wlr-notice-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.wlr-notice-login,
.wlr-notice-register {
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.wlr-notice-login:hover,
.wlr-notice-register:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.wlr-notice-login:before,
.wlr-notice-register:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.wlr-notice-login:hover:before,
.wlr-notice-register:hover:before {
    width: 300px;
    height: 300px;
}

/* 产品页面登录区域 */
.wlr-login-required {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.wlr-login-required::before {
    content: '🔒';
    font-size: 24px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f9fa;
    padding: 0 10px;
}

.wlr-message {
    color: #495057;
    font-size: 16px;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.wlr-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.wlr-login-btn,
.wlr-register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.wlr-register-btn {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 2px 10px rgba(118, 75, 162, 0.3);
}

.wlr-login-btn:hover,
.wlr-register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.wlr-register-btn:hover {
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4);
}

/* 商店循环登录按钮 */
.wlr-loop-login {
    text-align: center;
    margin-top: 10px;
}

.wlr-loop-login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.wlr-loop-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 隐藏价格样式 */
.wlr-hidden-price {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    color: #2d3436;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(255, 234, 167, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wlr-notice {
        padding: 15px;
        margin: 15px 0;
    }

    .wlr-notice p {
        font-size: 14px;
    }

    .wlr-notice-buttons {
        flex-direction: column;
        align-items: center;
    }

    .wlr-notice-login,
    .wlr-notice-register {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .wlr-login-required {
        padding: 20px 15px;
    }

    .wlr-buttons {
        flex-direction: column;
        align-items: center;
    }

    .wlr-login-btn,
    .wlr-register-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

/* 动画效果 */
.wlr-notice,
.wlr-login-required {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.wlr-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图标样式 */
.wlr-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 特殊状态 */
.wlr-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* 成功状态 */
.wlr-success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: #fff;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 184, 148, 0.3);
}

/* 错误状态 */
.wlr-error {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: #fff;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(225, 112, 85, 0.3);
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .wlr-notice {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }

    .wlr-login-btn,
    .wlr-register-btn {
        background: #000;
        border: 2px solid #fff;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .wlr-notice,
    .wlr-login-required {
        animation: none;
    }

    .wlr-notice::before {
        animation: none;
    }

    .wlr-login-btn,
    .wlr-register-btn,
    .wlr-loop-login-btn {
        transition: none;
    }
}
