/* ========================================================
   fill-copy-modal.css — 填空复制弹窗公共组件样式
   命名空间：.fcm-（fill-copy-modal 缩写）
   ======================================================== */

/* 遮罩层 */
.fcm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fcm-overlay.fcm-visible {
    display: flex;
}

/* 弹窗卡片 */
.fcm-modal {
    background: #fff;
    width: 100%;
    max-width: 620px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 40px rgba(2, 6, 23, 0.2);
    border: 1px solid #e2e8f0;
    animation: fcm-slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fcm-slide-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 头部区域 */
.fcm-header {
    padding: 20px 24px 14px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.fcm-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fcm-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcm-title-icon {
    font-size: 20px;
    line-height: 1;
}

.fcm-title-text {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.fcm-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.fcm-close-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.fcm-prompt-name {
    margin-top: 10px;
    font-size: 14px;
    color: #334155;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-all;
}

/* 胶囊 Tab 切换器 */
.fcm-tabs {
    margin-top: 14px;
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 999px;
    gap: 4px;
}

.fcm-tab {
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #64748b;
    box-shadow: none;
}
.fcm-tab.fcm-tab-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.fcm-tab:hover:not(.fcm-tab-active) {
    color: #475569;
}

/* 内容区域 */
.fcm-body {
    padding: 18px 24px;
    max-height: 56vh;
    overflow-y: auto;
}

/* 原文预览区 */
.fcm-raw-preview {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    max-height: 400px;
    overflow-y: auto;
}

/* 表单填写区 */
.fcm-fill-section {
    display: none;
}
.fcm-fill-section.fcm-visible {
    display: block;
}

.fcm-fill-hint {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.fcm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fcm-form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fcm-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 2px;
}

.fcm-form-label .fcm-required {
    color: #ef4444;
    font-weight: 700;
}

.fcm-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    box-sizing: border-box;
}
.fcm-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.fcm-form-input::placeholder {
    color: #94a3b8;
}

/* 进度条 */
.fcm-progress {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcm-progress-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.fcm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fcm-progress-bar.fcm-progress-complete {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.fcm-progress-text {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 底部操作栏 */
.fcm-footer {
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.fcm-btn-clear {
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.fcm-btn-clear:hover {
    border-color: #94a3b8;
    color: #334155;
}

.fcm-btn-copy {
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    transition: all 0.2s;
}
.fcm-btn-copy:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.fcm-btn-copy:active {
    transform: translateY(0);
}
.fcm-btn-copy.fcm-btn-copied {
    background: #10b981;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
    .fcm-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    .fcm-modal {
        max-width: 100%;
        border-radius: 18px 18px 0 0;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    .fcm-header {
        padding: 16px 16px 12px 16px;
    }
    .fcm-body {
        padding: 14px 16px;
        flex: 1;
        overflow-y: auto;
    }
    .fcm-footer {
        padding: 12px 16px;
    }
    .fcm-form-grid {
        grid-template-columns: 1fr;
    }
}
