/**
 * 分享管理模块样式
 */

/* 弹窗遮罩 */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.share-modal-overlay.active {
    display: flex;
}

/* 弹窗主体 */
.share-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow: hidden;
    animation: shareModalSlideUp 0.3s ease;
}

.share-modal-large {
    max-width: 600px;
}

@keyframes shareModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 弹窗头部 */
.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.share-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.share-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* 弹窗内容 */
.share-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 文件信息 */
.share-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
}

.share-file-icon {
    font-size: 32px;
}

.share-file-name {
    flex: 1;
    font-weight: 500;
    color: #1f2937;
    word-break: break-all;
}

/* 表单 */
.share-form h4 {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-form-group {
    margin-bottom: 16px;
}

.share-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.share-form-group label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.share-form-group input[type="text"],
.share-form-group input[type="number"],
.share-form-group input[type="datetime-local"],
.share-form-group textarea,
.share-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.share-form-group input:focus,
.share-form-group textarea:focus,
.share-form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.share-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.share-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 弹窗底部 */
.share-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.batch-share-count {
    margin-right: auto;
    font-size: 14px;
    color: #6b7280;
}

/* 按钮 */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.share-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.share-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.share-btn-secondary:hover {
    background: #e5e7eb;
}

/* 批量分享文件列表 */
.batch-share-files {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
}

.batch-share-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.batch-share-file-item:last-child {
    border-bottom: none;
}

.batch-share-file-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.batch-share-file-icon {
    font-size: 20px;
}

.batch-share-file-name {
    flex: 1;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分享结果 */
.share-result-url {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.share-result-url input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #f9fafb;
}

.share-copy-btn {
    padding: 12px 16px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.share-copy-btn:hover {
    background: #4f46e5;
}

.share-result-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 12px;
}

.share-result-label {
    font-size: 14px;
    color: #6b7280;
}

.share-result-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.share-result-qrcode {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.share-result-qrcode canvas,
.share-result-qrcode img {
    border-radius: 8px;
}

/* 批量结果 */
.batch-result-summary {
    text-align: center;
    padding: 16px;
    background: #ecfdf5;
    border-radius: 12px;
    color: #065f46;
    margin-bottom: 16px;
}

.batch-result-links textarea {
    width: 100%;
    height: 150px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-family: monospace;
    resize: none;
    background: #f9fafb;
    margin-bottom: 12px;
}

/* 响应式 */
@media (max-width: 480px) {
    .share-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
    }
    
    .share-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .share-form-row {
        grid-template-columns: 1fr;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .share-modal {
        background: #1f2937;
    }
    
    .share-modal-header {
        border-color: #374151;
    }
    
    .share-modal-header h3 {
        color: #f9fafb;
    }
    
    .share-modal-close {
        background: #374151;
        color: #9ca3af;
    }
    
    .share-modal-close:hover {
        background: #4b5563;
        color: #f9fafb;
    }
    
    .share-file-info {
        background: #374151;
    }
    
    .share-file-name {
        color: #f9fafb;
    }
    
    .share-form-group label {
        color: #d1d5db;
    }
    
    .share-form-group input,
    .share-form-group textarea,
    .share-form-group select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .share-form-group input:focus,
    .share-form-group textarea:focus,
    .share-form-group select:focus {
        border-color: #818cf8;
    }
    
    .share-modal-footer {
        background: #111827;
        border-color: #374151;
    }
    
    .share-btn-secondary {
        background: #374151;
        color: #d1d5db;
    }
    
    .share-btn-secondary:hover {
        background: #4b5563;
    }
    
    .batch-share-files {
        border-color: #374151;
    }
    
    .batch-share-file-item {
        border-color: #374151;
    }
    
    .batch-share-file-name {
        color: #d1d5db;
    }
    
    .share-result-url input,
    .batch-result-links textarea {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .share-result-info {
        background: #374151;
    }
    
    .share-result-label {
        color: #9ca3af;
    }
    
    .share-result-value {
        color: #f9fafb;
    }
}
