/**
 * 参与拼团页面样式
 * @author cany(3808684706)
 */

/* 独立页面容器 */
.join-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #5877ff, #8a9fff);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 40px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.el-dialog{
    font-size: 16px;
}

/* 修复页面滚动条 */
.template.join {
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 右上角装饰图片 */
.decor-img {
    position: absolute;
    width: 2000px;
    height: auto;
    opacity: 0.9;
    pointer-events: none;
    top: 0;
}

.join-page {
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

/* 页面标题 */
.page-title {
    margin-bottom: 32px;
}

.page-title .title-text {
    font-size: 40px;
    font-weight: 700;
    color: #ffdd57;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 3px;
}

.page-title .title-sub {
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    margin-left: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 加载状态 */
.loading-wrapper {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4f6ef2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-wrapper {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
}

.error-icon {
    font-size: 64px;
    color: #dcdfe6;
    margin-bottom: 20px;
}

.error-text {
    font-size: 16px;
    color: #909399;
    margin-bottom: 24px;
}

/* 拼团卡片 - 横版布局 */
.join-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 28px 24px;
    gap: 24px;
    margin-bottom: 24px;
}

/* 左侧：团长信息 */
.card-left {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 16px;
    background: linear-gradient(135deg, #4a6cf7 0%, #5d7dff 100%);
    border-radius: 16px;
    min-width: 180px;
}

.leader-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
}

.leader-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leader-name {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.leader-price {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

/* 中间：成员进度 */
.card-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.member-slots {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* 槽位包装器 */
.slot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.slot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #fff;
    border: 2px solid #e0e6ff;
    position: relative;
    flex-shrink: 0;
}

.slot.filled {
    background: linear-gradient(135deg, #4a6cf7 0%, #5d7dff 100%);
    border-color: #4a6cf7;
    color: #fff;
}

.slot.empty {
    background: #fff;
    border: 2px dashed #c5ceff;
    color: #a0b0ff;
}

.slot.empty i {
    font-size: 16px;
}

/* 头像首字 */
.slot-avatar {
    font-size: 22px;
    font-weight: 600;
}

/* 名字 */
.slot-name {
    font-size: 12px;
    color: #606266;
    max-width: 60px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 手机号 */
.slot-phone {
    font-size: 11px;
    color: #909399;
    max-width: 80px;
    text-align: center;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 团长标签 */
.leader-tag {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    border: 1px solid #fff;
    background: linear-gradient(90deg, #ff7f48, #fc543e);
    font-size: 12px;
    line-height: 16px;
    color: #fff;
    padding: 0 5px;
    white-space: nowrap;
    font-weight: 400;
}

.slot-connector {
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #c5ceff, #e0e6ff);
    flex-shrink: 0;
    margin-top: 27px;
}

/* 倒计时 - 行内样式 */
.countdown-inline {
    font-size: 15px;
    color: #ff6b6b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown-inline.timeout {
    color: #909399;
}

/* 右侧：操作按钮 */
.card-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 140px;
    flex-shrink: 0;
}
 
.card-right .btn-join {
    height: auto;
    min-height: 48px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a6cf7 0%, #5d7dff 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.35);
    white-space: normal;
    line-height: 1.4;
}

.card-right .btn-join:hover {
    background: linear-gradient(135deg, #3d5ee6 0%, #4a6cf7 100%);
}

.card-right .btn-share {
    height: 46px;
    font-size: 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e6ff;
    color: #4a6cf7;
    font-weight: 500;
}

.card-right .btn-share:hover {
    background: #f5f7ff;
    border-color: #c5ceff;
}

/* 商品信息卡片 */
.product-info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    padding: 32px 24px;
    margin-bottom: 24px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.product-header .product-name {
    font-size: 22px;
    font-weight: 600;
    color: #303133;
    margin: 0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-price .original-price {
    font-size: 16px;
    color: #909399;
    text-decoration: line-through;
}

.product-price .group-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b6b;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
}

.detail-item .label {
    width: 100px;
    color: #909399;
    font-size: 16px;
    flex-shrink: 0;
}

.detail-item .value {
    color: #303133;
    font-size: 16px;
}

.detail-item .highlight {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 20px;
}

/* 登录提示 */
.login-tip {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.login-tip a {
    color: #ffdd57;
    text-decoration: none;
    font-weight: 600;
}

.login-tip a:hover {
    text-decoration: underline;
}

/* 返回首页按钮 */
.back-home {
    text-align: center;
    margin-top: 24px;
}

.back-home a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.back-home a:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* 分享弹窗 */
.share-content {
    text-align: center;
}

.share-tip {
    font-size: 14px;
    color: #606266;
    margin-bottom: 16px;
}

.share-link {
    padding: 12px 16px;
    background: #f5f7fa;
    border-radius: 6px;
    word-break: break-all;
    font-size: 13px;
    color: #409eff;
    margin-bottom: 16px;
}

.share-slogan {
    padding: 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    border-radius: 8px;
    word-break: break-all;
    font-size: 14px;
    color: #303133;
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.8;
    white-space: pre-wrap;
    border: 1px solid #e4e7ed;
}

/* 弹窗位置修复 */
.join-container .el-dialog__wrapper {
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
}

.join-container .el-dialog {
    margin-top: 10vh !important;
    margin-bottom: 10vh !important;
}

.join-container .el-dialog.el-dialog--center {
    margin-top: 10vh !important;
}

/* 确认弹窗样式 */
.confirm-content {
    line-height: 2;
    color: #606266;
    font-size: 14px;
}

.confirm-content p {
    margin: 0 0 12px 0;
}

.confirm-content .highlight {
    color: #f56c6c;
    font-weight: 600;
}

.confirm-content .confirm-question {
    margin-top: 20px;
    font-weight: 500;
    color: #303133;
}

/* 响应式适配 */
@media screen and (max-width: 860px) {
    .join-container {
        padding: 40px 15px 30px;
    }
    
    .decor-img {
        width: 120px;
        top: 10px;
        right: 10px;
    }
    
    .page-title .title-text {
        font-size: 24px;
    }
    
    .page-title .title-sub {
        font-size: 18px;
    }
    
    /* 卡片改为竖版 */
    .join-card {
        flex-direction: column;
        padding: 16px;
    }
    
    .card-left {
        width: 80%;
        justify-content: center;
    }
    
    .card-center {
        width: 100%;
    }
    
    .member-slots {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .card-right {
        width: 100%;
        flex-direction: row;
    }
    
    .card-right .btn-join,
    .card-right .btn-share {
        flex: 1;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media screen and (max-width: 480px) {
    .page-title {
        text-align: center;
    }
    
    .page-title .title-sub {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .slot {
        width: 48px;
        height: 48px;
    }
    
    .slot-connector {
        width: 20px;
    }
    
    .product-price .group-price {
        font-size: 18px;
    }
}

/* 会员折扣相关样式 */
.member-discount-tip {
    text-align: center;
    font-size: 12px;
    color: #67c23a;
    margin-top: -8px;
}

.member-discount {
    display: block;
    font-size: 12px;
    color: #67c23a;
    margin-top: 4px;
}

.discount-info {
    font-size: 12px;
    color: #67c23a;
}

/* 余额不足引导充值弹窗 */
.recharge-guide-content {
    text-align: center;
    padding: 20px 0;
}

.recharge-guide-content .guide-icon {
    margin-bottom: 20px;
}

.recharge-guide-content .guide-line1 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 12px;
}

.recharge-guide-content .guide-line2 {
    font-size: 14px;
    color: #606266;
    margin: 0;
}

/* 分享弹窗响应式 */
.share-dialog {
    width: 480px;
}

/* 手机端响应式适配 */
@media screen and (max-width: 768px) {
    .share-dialog {
        width: 85% !important;
    }

    .my-group-page {
        padding: 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .group-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .group-body {
        padding: 16px;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-row .label {
        width: auto;
    }

    .group-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .filter-tabs .el-radio-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .progress-section {
        padding: 12px 16px;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-icon {
        font-size: 48px;
    }
}

/* ==== 参团立省Banner ==== */

.join-savings-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #e8f5e9, #c8e6c9);
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #2e7d32;
    font-weight: 600;
}
.join-savings-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.join-savings-text {
    line-height: 1.5;
}

/* ==== 团长价双价展示 ==== */

/* 团长已享专属优惠标注 */
.leader-enjoyed-hint {
    font-size: 12px;
    color: #e6790e;
    font-weight: 500;
    margin-top: 2px;
    display: block;
}

/* 商品信息卡：团长实付说明（灰色小字） */
.leader-paid-note {
    display: block;
    font-size: 12px;
    color: #97a3b7;
    margin-top: 4px;
}
