/**
 * 评论抽奖系统前端样式 - 子比主题兼容版
 */
/* 基础容器 - 子比风格 */
.comment-lottery-container {
    margin: 20px 0;
    padding: 15px;
    background: var(--box-bg, #f9f9f9);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--main-color, #333);
    font-size: 14px;
    transition: .2s;
}

.comment-lottery-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--main-color, #333);
    padding-bottom: 8px;
    position: relative;
}

.comment-lottery-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--focus-color, #ff6b6b);
    border-radius: 2px;
}

.comment-lottery-info {
    font-size: 14px;
    color: var(--muted-color, #666);
    margin-bottom: 15px;
    line-height: 1.7;
}

.comment-lottery-times {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    background: var(--muted-bg-color, #f5f5f5);
    padding: 8px 12px;
    border-radius: 6px;
}

.comment-lottery-times-count {
    font-size: 16px;
    font-weight: bold;
    color: var(--focus-color, #ff6b6b);
    margin-left: 5px;
}

/* 按钮组 - 子比风格 */
.comment-lottery-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-lottery-draw-btn {
    background-color: var(--focus-color, #4a89dc);
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    line-height: 1.5;
}

.comment-lottery-draw-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.comment-lottery-draw-btn:disabled {
    background-color: var(--muted-2-color, #9db5d8);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.comment-lottery-buy-btn,
.comment-lottery-exchange-btn {
    background-color: var(--success-color, #5cb85c);
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    line-height: 1.5;
}

.comment-lottery-buy-btn:hover,
.comment-lottery-exchange-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* 结果显示 - 子比风格 */
.comment-lottery-result {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    transition: all .3s;
}

.comment-lottery-result.success {
    background-color: var(--success-light-color, #dff0d8);
    border: 1px solid var(--success-color, #d6e9c6);
    color: var(--success-color, #3c763d);
}

.comment-lottery-result.error {
    background-color: var(--danger-light-color, #f2dede);
    border: 1px solid var(--danger-color, #ebccd1);
    color: var(--danger-color, #a94442);
}

.comment-lottery-result-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.comment-lottery-result-content {
    font-size: 14px;
    line-height: 1.7;
}

.comment-lottery-prize-image {
    max-width: 100px;
    max-height: 100px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid var(--muted-border-color, #eee);
    padding: 3px;
    background: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-lottery-buttons {
        flex-direction: column;
    }
    
    .comment-lottery-draw-btn,
    .comment-lottery-buy-btn,
    .comment-lottery-exchange-btn {
        width: 100%;
    }
}

/* 模态框样式 - 子比风格 */
.comment-lottery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

.comment-lottery-modal-content {
    background-color: var(--box-bg, #fff);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--muted-border-color, #ddd);
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-lottery-modal-close {
    color: var(--muted-color, #aaa);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.comment-lottery-modal-close:hover,
.comment-lottery-modal-close:focus {
    color: var(--main-color, #000);
    text-decoration: none;
}

.comment-lottery-modal-header {
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--muted-border-color, #eee);
}

.comment-lottery-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color, #333);
}

.comment-lottery-modal-body {
    margin-bottom: 20px;
    color: var(--main-color, #333);
    line-height: 1.7;
}

.comment-lottery-modal-footer {
    padding-top: 10px;
    border-top: 1px solid var(--muted-border-color, #eee);
    text-align: right;
}

/* 动画效果 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.comment-lottery-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
}

/* 奖品包装样式 - 子比风格 */
.comment-lottery-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.comment-lottery-package {
    border: 1px solid var(--muted-border-color, #ddd);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--box-bg, #fff);
}

.comment-lottery-package:hover {
    border-color: var(--focus-color, #4a89dc);
    background-color: var(--focus-light-color, #f5f7fa);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.comment-lottery-package.selected {
    border-color: var(--focus-color, #4a89dc);
    background-color: var(--focus-light-color, #e0e7f5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.comment-lottery-package-times {
    font-size: 18px;
    font-weight: bold;
    color: var(--main-color, #333);
}

.comment-lottery-package-cost {
    font-size: 14px;
    color: var(--muted-color, #666);
    margin-top: 5px;
}

/* 评论中的中奖标志 - 子比风格 */
.comment-lottery-winner-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    background-color: var(--focus-light-color, rgba(255, 107, 107, 0.1));
    color: var(--focus-color, #ff6b6b);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.comment-lottery-winner-badge::before {
    content: "🎁";
    margin-right: 3px;
}

/* 中奖评论图标样式 - 简化版 */
.comment-lottery-winner-icon-only {
    position: relative;
}

/* 强制设置位置，添加!important确保优先级 */
/* 注意：尺寸由PHP动态生成，这里的宽度和高度会被覆盖 */
.comment-lottery-winner-icon-only::after {
    content: "";
    position: absolute !important;
    top: 50% !important;
    right: 15px !important;
    transform: translateY(-50%) !important;
    /* 尺寸会通过PHP动态设置 */
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
    pointer-events: none !important; /* 关键修改：不接收鼠标事件，允许点击穿透到下面的元素 */
    z-index: 9 !important; /* 提高层级确保可见 */
    opacity: 0.5 !important; /* 设置透明度为0.5，按照要求 */
    display: block !important;
    visibility: visible !important;
    /* 默认使用礼物图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23ff6b6b' d='M20,7h-1.5c0.88-0.99,1.5-2.41,1.5-4c0-1.66-1.34-3-3-3c-1.6,0-2.99,1.27-3,2.86L14,3c0,0-0.01-0.01-0.01-0.01 C13.99,2.99,13.98,2.97,13.97,2.96C13.69,2.4,13.13,2,12.5,2c-0.83,0-1.5,0.67-1.5,1.5c0,0.84,0.69,1.52,1.53,1.5 c0.54,0,1.02-0.29,1.29-0.72c0.01,0.03,0.04,0.05,0.05,0.08c0.42,0.75,1.12,1.31,1.91,1.55C15.26,6.23,14.73,6.5,14,6.5 c-0.04,0-0.07-0.01-0.11-0.01c-0.44,0.5-1.1,0.81-1.89,0.81c-0.46,0-0.97-0.16-1.38-0.43C10.34,6.67,10,6.42,9.84,6.21 C9.41,5.6,8.79,5.16,8.06,5C8.03,5,8,5,7.97,5C7.71,6.21,6.62,7.5,4.5,7.5c-0.17,0-0.33-0.03-0.5-0.05V9l0,0v6h2v5h16v-5h2V9V7 H20z M15,5.5c0-0.83,0.67-1.5,1.5-1.5c0.83,0,1.5,0.67,1.5,1.5S17.33,7,16.5,7S15,6.33,15,5.5z M20,18h-6v-2h6V18z M20,14h-8V9h8 V14z M4,18v-2h6v2H4z M12,14H4V9h8V14z'/%3E%3C/svg%3E");
}

/* 自定义图标样式 */
.comment-lottery-winner-icon {
    pointer-events: none; /* 关键修改：不接收鼠标事件，允许点击穿透到下面的元素 */
    position: relative;
    opacity: 0.1; /* 将不透明度降低至0.1，使图标几乎透明 */
    z-index: 0; /* 设置层级为0 */
} 