/**
 * zibll-segment-pay 前台样式
 * 分段付费功能样式
 */

.pay-segment {
    margin: 20px 0;
    padding: 20px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.pay-segment:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 已购买状态 */
.pay-segment.show {
    background: #f0f8ff;
    border: 1px solid #aaccff;
}

.pay-segment.show:hover {
    border-color: #88bbee;
}

/* VIP专属 */
.pay-segment.vip-1,
.pay-segment.vip-2 {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border: 1px solid #ffcc00;
}

.pay-segment.vip-2 {
    background: linear-gradient(135deg, #ffe6f0 0%, #ffd6e8 100%);
    border: 1px solid #ff66aa;
}

/* 仅VIP可购买 */
.pay-segment.vip-only {
    background: #fff9e6;
    border: 1px solid #ffcc00;
    padding: 15px;
    text-align: center;
}

/* 免费试读 */
.pay-segment.free {
    background: #f0fff0;
    border: 1px solid #90ee90;
}

/* 错误状态 */
.pay-segment.pay-error {
    background: #fff0f0;
    border: 1px solid #ff9999;
    color: #cc0000;
    padding: 10px;
    text-align: center;
}

/* 信息标签 */
.pay-segment-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.pay-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white !important;
    border-radius: 3px;
    vertical-align: middle;
}

/* 价格盒子 */
.pay-segment .muted-box {
    background: white;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.pay-segment .muted-box .flex {
    padding: 5px 0;
}

.pay-segment .muted-box .flex:first-child {
    padding-top: 0;
}

.pay-segment .muted-box .flex:last-child {
    padding-bottom: 0;
}

/* 价格文字 */
.pay-segment .c-red {
    color: #ee5a5a;
}

.pay-segment .c-green {
    color: #5cb85c;
}

.pay-segment .font-bold {
    font-weight: bold;
    font-size: 1.1em;
}

/* 删除线 */
.pay-segment .text-line-through {
    text-decoration: line-through;
    color: #999;
}

/* VIP图标 */
.pay-segment .c-vip {
    color: #ff6b6b;
    font-weight: bold;
}

/* 购买按钮容器 */
.pay-segment .pay-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 购买按钮 */
.pay-segment .but {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.pay-segment .but:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pay-segment .but:active {
    transform: translateY(0);
}

/* 余额支付按钮 */
.pay-segment .but.jb-red {
    background: linear-gradient(135deg, #ee5a5a 0%, #dd4444 100%);
    color: white;
}

.pay-segment .but.jb-red:hover {
    background: linear-gradient(135deg, #dd4444 0%, #cc3333 100%);
}

/* 积分支付按钮 */
.pay-segment .but.jb-yellow {
    background: linear-gradient(135deg, #f0ad4e 0%, #ec971f 100%);
    color: white;
}

.pay-segment .but.jb-yellow:hover {
    background: linear-gradient(135deg, #ec971f 0%, #d58512 100%);
}

/* 登录按钮 */
.pay-segment .but.jb-blue {
    background: linear-gradient(135deg, #5bc0de 0%, #4bb8d6 100%);
    color: white;
}

.pay-segment .but.jb-blue:hover {
    background: linear-gradient(135deg, #4bb8d6 0%, #3aa8c6 100%);
}

/* 余额不足按钮 */
.pay-segment .but.c-yellow {
    background: #f5f5dc;
    color: #ccaa44;
    cursor: not-allowed;
}

.pay-segment .but.c-yellow:hover {
    transform: none;
    box-shadow: none;
}

/* 已购买标记 */
.pay-segment .hidden-text {
    font-size: 12px;
    color: #5cb85c;
    margin-bottom: 10px;
    padding: 5px 10px;
    background: rgba(92, 184, 92, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.pay-segment.show .hidden-text {
    margin-bottom: 10px;
}

/* 隐藏内容容器 */
.pay-segment .hidden-box {
    position: relative;
}

/* 加载动画 */
.pay-segment .but.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.pay-segment .but.loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: zibll-segment-pay-spin 0.8s linear infinite;
}

@keyframes zibll-segment-pay-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .pay-segment {
        margin: 15px 0;
        padding: 15px;
    }
    
    .pay-segment .pay-buttons {
        flex-direction: column;
    }
    
    .pay-segment .but {
        width: 100%;
        margin: 5px 0;
    }
}

/* 管理员预览模式 */
.pay-segment.admin-preview {
    border: 2px dashed #ff6600;
}

.pay-segment.admin-preview::before {
    content: '👁️ 付费段落预览';
    position: absolute;
    top: -12px;
    right: 10px;
    background: #ff6600;
    color: white;
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 3px;
}

/* 成功动画 */
.pay-segment.pay-success {
    animation: zibll-segment-pay-success 0.5s ease;
}

@keyframes zibll-segment-pay-success {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}
