/* 弹窗遮罩层 */
.wgv-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.wgv-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗容器 */
.wgv-popup-container {
    position: relative;
    margin: auto;
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.wgv-voucher-popup-close-btn {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 35px !important;
    height: 35px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wgv-voucher-popup-close-btn:hover {
    background: white !important;
    transform: rotate(90deg) !important;
    color: #ff69b4 !important;
}

/* 弹窗内容 */
.wgv-popup-content {
    display: flex;
    min-height: 500px;
}

/* 左侧优惠券票面（纯 CSS） */
.wgv-popup-left {
    flex: 0 0 380px;
    background: linear-gradient(160deg, #ff4d94 0%, #e60f6e 55%, #c9085a 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    color: #fff;
    text-align: center;
}

.wgv-popup-left::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -70px;
    right: -70px;
}

.wgv-popup-left::after {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -60px;
    left: -60px;
}

.wgv-ticket {
    position: relative;
    width: 100%;
    z-index: 1;
    padding-top: 44px;
}

.wgv-ticket-ribbon {
    position: absolute;
    top: 14px;
    left: -44px;
    transform: rotate(-45deg);
    background: #fff;
    color: #e60f6e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 40px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.wgv-ticket-gift {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 12px;
}

.wgv-ticket-amount {
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.wgv-ticket-off {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-left: 10px;
}

.wgv-ticket-divider {
    width: 100%;
    border-top: 2px dashed rgba(255, 255, 255, 0.6);
    margin: 28px 0;
}

.wgv-ticket-usage {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.wgv-ticket-usage-sub {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 8px;
}

.wgv-ticket-expiry {
    display: inline-block;
    margin-top: 26px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* 右侧表单 */
.wgv-popup-right {
    flex: 1;
    padding: 45px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wgv-popup-right h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #1a2332;
    font-weight: 700;
}

.wgv-popup-subtitle {
    margin: 0 0 24px;
    font-size: 16px;
    color: #6b7280;
}

/* 表单样式 */
.wgv-popup-form {
    margin-bottom: 0;
}

.wgv-form-group {
    margin-bottom: 20px;
}

.wgv-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.wgv-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wgv-form-group input:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

/* 提交按钮 */
.wgv-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.wgv-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}

.wgv-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 社交证明 / 使用限制 */
.wgv-social-proof {
    margin: 14px 0 0;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

.wgv-star {
    color: #f59e0b;
}

.wgv-cannot-combine {
    margin: 8px 0 0;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* 底部小字 */
.wgv-popup-footnote {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.wgv-popup-footnote p {
    margin: 4px 0;
    font-size: 11px;
    color: #b0b0b0;
    line-height: 1.5;
    text-align: center;
}

/* 成功提示 */
.wgv-popup-success {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.wgv-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    font-size: 40px;
    line-height: 70px;
    border-radius: 50%;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.wgv-popup-success h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1a2332;
}

/* 优惠券代码显示 */
.wgv-voucher-code-display {
    margin: 20px 0;
    padding: 18px 20px;
    background: #fff5fa;
    border: 2px dashed #ff9ec7;
    border-radius: 12px;
}

.wgv-voucher-code-display label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9ca3af;
}

.wgv-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.wgv-code-box span {
    font-size: 26px;
    font-weight: 700;
    color: #e60f6e;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.wgv-copy-btn {
    padding: 8px 20px;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wgv-copy-btn:hover {
    background: #ff1493;
}

.wgv-copy-btn.copied {
    background: #4caf50;
}

/* 过期日期警告 */
.wgv-expiry-warning {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 600;
    color: #d97706;
}

.wgv-expiry-warning strong {
    color: #d97706;
}

/* 下一步指引 */
.wgv-next-steps {
    max-width: 340px;
    margin: 0 auto 24px;
    text-align: left;
}

.wgv-next-steps p {
    margin: 8px 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.wgv-next-steps strong {
    color: #e60f6e;
    margin-right: 4px;
}

/* 立即购物按钮 */
.wgv-shop-now-btn {
    display: inline-block;
    padding: 14px 48px;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wgv-shop-now-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wgv-popup-overlay {
        padding: 10px;
    }
    
    .wgv-popup-content {
        flex-direction: column;
        min-height: auto;
    }
    
    .wgv-popup-left {
        flex: 0 0 auto;
        min-height: 170px;
        padding: 32px 20px;
    }
    
    .wgv-ticket-gift {
        display: none;
    }
    
    .wgv-ticket-amount {
        font-size: 44px;
    }
    
    .wgv-ticket-off {
        font-size: 24px;
    }
    
    .wgv-ticket-divider,
    .wgv-ticket-usage,
    .wgv-ticket-usage-sub {
        display: none;
    }
    
    .wgv-ticket-expiry {
        margin-top: 14px;
    }
    
    .wgv-ticket-ribbon {
        top: 12px;
        left: -40px;
        font-size: 9px;
        padding: 4px 34px;
    }
    
    .wgv-popup-right {
        padding: 28px 20px;
    }
    
    .wgv-popup-right h2 {
        font-size: 22px;
    }
    
    .wgv-popup-subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }
    
    .wgv-form-group {
        margin-bottom: 14px;
    }
    
    .wgv-code-box {
        flex-direction: column;
    }
    
    .wgv-code-box span {
        font-size: 20px;
    }
}

/* 加载动画 */
.wgv-btn-loading {
    display: inline-block;
}

.wgv-btn-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
