/**
 * 模板2样式 - 活动行风格
 */

/* 页面背景色覆盖 */
body {
    background-color: var(--main-bg-color) !important;
    --mian-max-width: 1000px!important;
}

/* 主容器 */
.activity-template2 {
    padding-top: 20px;
}

/* 顶部轮播图区域 */
.t2-cover-section {
    margin-bottom: 20px;
}

.t2-cover-section .zib-slider {
    border-radius: 8px;
    overflow: hidden;
}

.t2-cover-section .new-swiper {
    border-radius: 8px;
    overflow: hidden;
}

.t2-cover-section .swiper-slide img {
    width: 100%;
    height: var(--pc-height, 400px);
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .t2-cover-section .swiper-slide img {
        height: var(--m-height, 180px);
    }
}

/* 信息区域 */
.t2-info-section {
    border-radius: 8px;
    padding: 0 20px 20px 20px;
    margin-bottom: 20px;
    box-shadow: var(--main-shadow);
}

/* 标题区 */
.t2-title-box {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--main-border-color);
}

.t2-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--key-color);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}


/* 标题区meta行（状态标签+操作按钮） */
.t2-title-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* 状态标签 */
.t2-tags {
    display: flex;
    gap: 8px;
}

/* 标题区操作按钮 */
.t2-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.t2-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 16px;
}

.t2-title-actions .t2-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.t2-title-actions .t2-btn svg {
    width: 14px;
    height: 14px;
}

.t2-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 18px;
}

.t2-tag-audit {
    background: rgba(250, 140, 22, 0.1);
    color: #fa8c16;
    border: 1px solid rgba(250, 140, 22, 0.3);
}

.t2-tag-open {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.3);
}

.t2-tag-free {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.3);
}

.t2-tag-pending {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
    border: 1px solid rgba(24, 144, 255, 0.3);
}

.t2-tag-ended {
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted-3-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 时间地点详情 */
.t2-detail-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--main-border-color);
}

.t2-detail-item:last-child {
    border-bottom: none;
}

.t2-detail-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--body-bg-color);
    color: var(--focus-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.t2-detail-icon i {
    font-size: 18px;
}

.t2-detail-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 36px;
}

.t2-detail-label {
    font-size: 16px;
    color: var(--muted-3-color);
    flex-shrink: 0;
}

.t2-detail-value {
    font-size: 16px;
    color: var(--muted-color);
}


/* 价格区 */
.t2-price-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--main-border-color);
}

.t2-price-left {
    display: flex;
    align-items: baseline;
}

.t2-price-symbol {
    font-size: 20px;
    color: var(--focus-color);
    font-weight: 600;
}

.t2-price-value {
    font-size: 28px;
    color: var(--focus-color);
    font-weight: 600;
}

.t2-price-free {
    font-size: 20px;
    color: var(--color-green);
    font-weight: 600;
}

.t2-price-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* 已报名人数（价格区右对齐） */
.t2-registered-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--muted-2-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.t2-registered-count i {
    font-size: 14px;
}

/* 会员价格标签样式优化 - 覆盖子比 .but-average>.but 的 width:100% */
#t2-vip-price-wrap .but-average > .but {
    width: auto;
}

/* 票种选择区域 */
.t2-ticket-section {
    padding-top: 16px;
    border-top: 1px solid var(--main-border-color);
}

/* 票种卡片列表 - 1排2列 */
.t2-ticket-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}

/* 票种卡片 */
.t2-ticket-card {
    border: 2px solid var(--main-border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    /* 初始状态：透明 + 向下偏移 */
    opacity: 0;
    transform: translateY(20px);
    /* 动画：淡入 + 向上滑入 */
    animation: ticketCardFadeIn 0.4s ease-out forwards;
}

/* 票种卡片加载动画 */
@keyframes ticketCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为每个卡片添加延迟，形成依次出现的效果 */
.t2-ticket-card:nth-child(1) { animation-delay: 0.05s; }
.t2-ticket-card:nth-child(2) { animation-delay: 0.1s; }
.t2-ticket-card:nth-child(3) { animation-delay: 0.15s; }
.t2-ticket-card:nth-child(4) { animation-delay: 0.2s; }
.t2-ticket-card:nth-child(5) { animation-delay: 0.25s; }
.t2-ticket-card:nth-child(6) { animation-delay: 0.3s; }
.t2-ticket-card:nth-child(7) { animation-delay: 0.35s; }
.t2-ticket-card:nth-child(8) { animation-delay: 0.4s; }
.t2-ticket-card:nth-child(9) { animation-delay: 0.45s; }
.t2-ticket-card:nth-child(10) { animation-delay: 0.5s; }

.t2-ticket-card:hover {
    border-color: var(--focus-color);
}

.t2-ticket-card.active {
    border-color: var(--focus-color);
    background: rgba(var(--focus-color-rgb, 82, 196, 26), 0.02);
}

.t2-ticket-card.sold-out {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 已售罄水印 - 盖章效果 */
.t2-sold-out-stamp {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    padding: 6px 16px;
    border: 3px solid #ff4d4f;
    border-radius: 8px;
    color: #ff4d4f;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

/* 票种头部：名称 + 数量选择器 */
.t2-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.t2-ticket-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--key-color);
}

/* 数量选择器 - 默认隐藏，选中时显示 */
.t2-ticket-spinner {
    display: none;
}

.t2-ticket-card.active .t2-ticket-spinner {
    display: block;
}

.t2-ticket-spinner .tianyu-spinner {
    border: none;
    background: transparent;
}

.t2-ticket-spinner .minus-btn,
.t2-ticket-spinner .plus-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t2-ticket-spinner .minus-btn {
    background: var(--muted-box-color);
    color: var(--muted-2-color);
}

.t2-ticket-spinner .plus-btn {
    background: var(--focus-color);
    color: #fff;
}

.t2-ticket-spinner .number-input {
    min-width: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

/* 票种价格 */
.t2-ticket-price {
    margin-bottom: 8px;
}

.t2-ticket-price-symbol {
    font-size: 14px;
    color: var(--focus-color);
}

.t2-ticket-price-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--focus-color);
}

.t2-ticket-price-free {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-green);
}

/* 票种审核提示 */
.t2-ticket-audit {
    font-size: 13px;
    color: var(--muted-2-color);
    margin-bottom: 6px;
    padding: 6px 10px;
    background: var(--muted-box-color);
    border-radius: 4px;
}

/* 票种说明 */
.t2-ticket-desc {
    font-size: 13px;
    color: var(--muted-2-color);
    line-height: 1.5;
    margin-bottom: 6px;
}

/* 票种库存 */
.t2-ticket-stock {
    font-size: 12px;
    color: var(--muted-3-color);
}

/* 已报名提示 */
.t2-registered-notice {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--main-bg-color);
    border-radius: 8px;
    border: 1px solid var(--main-border-color);
}

.t2-registered-notice .product-service-box {
    padding: 0;
    margin: 0;
}

.t2-registered-notice .icon-header {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    border-radius: 50%;
    text-align: center;
}

.t2-registered-notice .but.hollow {
    font-size: 12px;
}

/* PC端报名按钮容器 */
.t2-register-btn-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--main-border-color);
    text-align: center;
}

.t2-btn {
    padding: 10px 50px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 500;
    border: none;
    cursor: pointer; /* 默认指针 */
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.t2-btn-primary {
    background: linear-gradient(135deg, var(--focus-color) 0%, var(--focus-color-dark, var(--focus-color)) 100%);
    color: #fff;
    cursor: pointer; /* 确保可点击 */
}

.t2-btn-primary:hover {
    opacity: 0.9;
    color: #fff;
    cursor: pointer; /* 悬停时也是指针 */
}

.t2-btn-disabled {
    background: var(--focus-color);
    color: #fff;
    cursor: not-allowed; /* 只有禁用按钮才显示禁止图标 */
    opacity: 0.6;
}

/* 如果按钮有 data-toggle 属性，说明是可点击的，显示手型光标 */
.t2-btn-disabled[data-toggle] {
    cursor: pointer !important;
    opacity: 1;
}

.t2-btn-disabled:hover {
    color: #fff;
    cursor: not-allowed;
}

/* 有 data-toggle 的按钮悬停时也显示手型 */
.t2-btn-disabled[data-toggle]:hover {
    cursor: pointer !important;
}


.t2-btn-outline {
    background: transparent;
    border: 1px solid var(--main-border-color);
    color: var(--muted-2-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
}

.t2-btn-outline:hover {
    border-color: var(--focus-color);
    color: var(--focus-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .activity-template2 {
        padding-top: 10px;
    }
    
    .t2-info-section {
        padding: 16px;
        border-radius: 8px 8px 0 0;
    }
    
    .t2-title {
        font-size: 18px;
    }
    
    .t2-price-value {
        font-size: 24px;
    }
    
    .t2-detail-icon {
        width: 32px;
        height: 32px;
    }
    
    /* 移动端详情项：标签和内容分两行 */
    .t2-detail-item {
        cursor: pointer;
    }
    
    .t2-detail-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        line-height: 1.4;
    }
    
    .t2-detail-label {
        font-size: 12px;
    }
    
    .t2-detail-value {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* 移动端价格区无边框 */
    .t2-price-box {
        border-top: none;
        padding-bottom: 0;
    }
}

/* 移动端详情弹窗样式 */
.t2-modal-detail-list {
    padding: 16px;
}

.t2-modal-detail-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--main-border-color);
}

.t2-modal-detail-item:last-child {
    border-bottom: none;
}

.t2-modal-detail-label {
    font-size: 13px;
    color: var(--muted-3-color);
    margin-bottom: 6px;
}

.t2-modal-detail-value {
    font-size: 15px;
    color: var(--muted-color);
    word-break: break-all;
}


/* 推荐标签 */
.t2-tag-featured {
    background: linear-gradient(135deg, var(--focus-color) 0%, var(--focus-color-dark, var(--focus-color)) 100%);
    color: #fff;
    border: none;
}

/* 可复制元素 */
.t2-copyable {
    cursor: pointer;
}

.t2-copyable:hover {
    color: var(--focus-color);
}

.t2-copyable:hover .fa-copy {
    color: var(--focus-color);
}
