﻿/**
 * 帮追弹窗样式 - 深色主题
 */

/* 弹窗遮罩基础样式 - 居中显示 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.modal-show,
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 底部弹窗样式 - 单独使用 */
.modal-overlay.bottom-modal {
    align-items: flex-end;
}

/* 弹窗遮罩 */
.share-modal-overlay {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px);
    /* 改为底部弹窗 */
    align-items: flex-end !important;
}

/* 海报弹窗 */
.poster-modal-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px);
}

/* 海报弹窗内容 */
.poster-modal-content {
    width: 100%;
    max-height: 95vh;
    min-height: 60vh;
    height: fit-content;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px 20px 0 0;
    padding: 20px 16px env(safe-area-inset-bottom, 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    color: #fff;
    animation: slideUp 0.3s ease-out;
    box-sizing: border-box;
}

/* 隐藏滚动条但保持滚动功能 */
.poster-modal-content::-webkit-scrollbar {
    display: none;
}
.poster-modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 弹窗内容 - 深色主题 */
.share-modal-content {
    width: 100%;
    max-height: 90vh;
    height: auto;
    min-height: 50vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px max(40px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    position: relative;
    color: #fff;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.share-modal-close svg {
    width: 18px;
    height: 18px;
}

/* 追回成功滚动区域 */
.success-scroll-section {
    margin-bottom: 14px;
    flex-shrink: 0;
}

.success-scroll-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    padding-left: 4px;
}

.success-scroll-icon {
    font-size: 12px;
}

.success-scroll-container {
    height: 100px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 6px 10px;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.success-scroll-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.success-scroll-item:last-child {
    border-bottom: none;
}

.success-icon {
    font-size: 12px;
}

.success-info {
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
}

.success-amount {
    color: #52c41a;
    font-weight: 500;
    font-size: 11px;
}

/* 案件信息区域 */
.case-info-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 154, 0, 0.1) 100%);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.case-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.case-debtor-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.debtor-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9a00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.debtor-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.case-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.case-amount-badge {
    text-align: right;
}

.amount-currency {
    font-size: 12px;
    color: #ff6b35;
    font-weight: 500;
}

.amount-value {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
}

.case-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    word-break: break-all;
}

/* 帮追进度区域 */
.help-progress-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.progress-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.stat-value.highlight {
    color: #52c41a;
}

.progress-percent {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
}

.progress-bar-container {
    margin-bottom: 8px;
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35 0%, #ff9a00 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.progress-tip {
    color: #ff9a00;
    font-size: 10px;
}

/* 帮追按钮 */
.help-action-section {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.btn-help-chop {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9a00 100%);
    border-radius: 14px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.2s;
}

.btn-help-chop:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.help-btn-icon {
    font-size: 18px;
}

.help-btn-text {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.help-btn-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

/* 分享功能区 */
.share-actions-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.share-actions-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    text-align: center;
}

.share-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.share-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: none;
    transition: all 0.2s;
}

.share-action-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.share-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.poster-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.link-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.wechat-icon { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); }

.share-action-btn span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* 佣金提示 */
.commission-tip-section {
    background: rgba(82, 196, 26, 0.1);
    border: 1px solid rgba(82, 196, 26, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    flex-shrink: 0;
}

.commission-tip-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.tip-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.commission-tip-content strong {
    color: #52c41a;
    font-weight: 600;
}

/* 海报预览 */
.poster-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.poster-preview-content {
    max-width: 320px;
    width: 100%;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.poster-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.poster-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-download-poster,
.btn-close-poster {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.btn-download-poster {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9a00 100%);
    color: #fff;
}

.btn-close-poster {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-download-poster:active,
.btn-close-poster:active {
    transform: scale(0.98);
}

/* 响应式适配 - 小屏幕 */
@media (max-width: 375px) {
    .share-modal-content {
        padding: 16px 14px max(30px, env(safe-area-inset-bottom));
    }
    
    .success-scroll-container {
        height: 90px;
    }
    
    .amount-value {
        font-size: 16px;
    }
    
    .progress-percent {
        font-size: 16px;
    }
    
    .progress-stats {
        gap: 12px;
    }
    
    .stat-value {
        font-size: 13px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 320px) {
    .share-modal-content {
        padding: 14px 12px max(28px, env(safe-area-inset-bottom));
    }
    
    .share-actions-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .case-info-section,
    .help-progress-section,
    .share-actions-section {
        padding: 12px;
    }
}

/* ========================================
   海报分享弹窗样式 (PosterModal)
   ======================================== */

/* 弹窗遮罩 */
.poster-modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px);
    z-index: 1000;
}

/* 弹窗内容 */
.poster-modal-content {
    width: 100%;
    max-height: 90vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 32px;
    overflow-y: auto;
    position: relative;
    color: #fff;
    animation: slideUp 0.3s ease-out;
}

/* 弹窗头部 */
.poster-modal-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.poster-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.poster-modal-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* 关闭按钮 */
.poster-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    z-index: 10;
}

.poster-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.poster-modal-close svg {
    width: 18px;
    height: 18px;
}

/* 模板选择区域 */
.poster-template-section {
    margin-bottom: 20px;
}

.template-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.template-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.template-item {
    flex-shrink: 0;
    width: 80px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.template-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.template-item.selected {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.15);
}

.template-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.template-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* 海报预览区域 */
.poster-preview-section {
    margin-bottom: 20px;
}

.poster-preview-card {
    background: linear-gradient(135deg, #FF5000 0%, #FF6B35 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.poster-preview-header {
    margin-bottom: 16px;
}

.poster-preview-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.poster-preview-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.poster-preview-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: left;
}

.preview-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #FF5000, #FF6B35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.preview-user-info {
    flex: 1;
}

.preview-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.preview-case {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.poster-preview-amount {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.poster-preview-amount .amount-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.poster-preview-amount .amount-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.poster-preview-qrcode {
    display: inline-block;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
}

.poster-preview-brand {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 操作按钮 */
.poster-modal-actions {
    display: flex;
    gap: 12px;
}

.btn-regenerate,
.btn-save-poster {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.btn-regenerate {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-save-poster {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9a00 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.btn-regenerate:active,
.btn-save-poster:active {
    transform: scale(0.98);
}

/* 加载状态 */
.poster-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 100;
    border-radius: 24px 24px 0 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.poster-modal-loading span {
    color: #fff;
    font-size: 14px;
}

/* ============================================
   嵌入式海报模态框样式（SharePage内嵌）
   ============================================ */

/* 模态框遮罩 */
.poster-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框内容 */
.poster-modal-content {
    width: 90%;
    max-width: 360px;
    background: linear-gradient(180deg, #FF6B35 0%, #FF8F6B 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* 模态框头部 */
.poster-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.poster-modal-header button {
    color: white;
    font-size: 24px;
    line-height: 1;
}

/* 模态框内容区 */
.poster-modal-body {
    padding: 0 20px 20px;
}

/* 嵌入式海报卡片 */
.poster-card-embedded {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

/* 海报头部 */
.poster-header-embedded {
    margin-bottom: 16px;
}

.poster-logo-embedded {
    font-size: 24px;
    font-weight: bold;
    color: #FF6B35;
}

/* 海报用户信息 */
.poster-user-embedded {
    margin-bottom: 16px;
}

.poster-avatar-embedded {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #FF8F6B);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    overflow: hidden;
}

.poster-avatar-embedded img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-avatar-embedded span {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.poster-name-embedded {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.poster-code-embedded {
    font-size: 14px;
    color: #666;
}

/* 海报二维码区域 */
.poster-qr-embedded {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.poster-qr-embedded img,
.poster-qr-embedded canvas {
    border-radius: 8px;
}

/* 海报提示 */
.poster-tip-embedded {
    font-size: 14px;
    color: #999;
    margin-top: 8px;
}

/* 模态框底部 */
.poster-modal-footer {
    padding: 16px 20px 20px;
}

/* 保存按钮 */
.btn-save-poster {
    width: 100%;
    padding: 14px;
    background: white;
    color: #FF6B35;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-save-poster:active {
    transform: scale(0.98);
    opacity: 0.9;
}
