/* AI提案資料生成モーダル */

/* AI資料作成ボタン */
.btn-ai-document {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-ai-document:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-ai-document i {
    font-size: 1.2rem;
}

.ai-doc-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ai-doc-note i {
    color: var(--color-primary);
}

/* モーダルサイズ */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

/* ステップインジケーター */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.step.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.step.completed {
    background: var(--color-success-alt);
    color: white;
}

.step-line {
    width: 100px;
    height: 3px;
    background: #e5e7eb;
    margin: 0 1rem;
}

.step-line.completed {
    background: var(--color-success-alt);
}

/* セクションタイトル */
.section-title {
    text-align: center;
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-description {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.proposed-tag-inline {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin: 0 0.3rem;
}

/* 資料タイプカードグリッド */
.document-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.document-type-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: white;
}

.document-type-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.document-type-card.selected {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.document-type-card .card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.document-type-card h5 {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

.document-type-card .card-pages {
    text-align: center;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.document-type-card .card-description {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.5;
}

.document-type-card .card-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--color-success-alt);
    font-size: 1.5rem;
}

/* コスト表示 */
.cost-note {
    text-align: center;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.9rem;
}

.cost-note i {
    color: var(--color-warning);
    margin-right: 0.3rem;
}

/* 生成中画面 */
.generating-body {
    padding: 3rem 2rem;
}

.generating-container {
    text-align: center;
}

.robot-icon-large {
    font-size: 5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    animation: pulse-large 2s ease-in-out infinite;
}

@keyframes pulse-large {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.fa-spin-pulse {
    animation: spin-pulse 2s linear infinite;
}

@keyframes spin-pulse {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.generating-container h4 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* 成功メッセージ */
.success-message {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 12px;
}

.success-message i {
    font-size: 3rem;
    color: var(--color-success-alt);
    margin-bottom: 0.5rem;
}

.success-message h4 {
    font-size: 1.3rem;
    color: #065f46;
}

/* 資料プレビュー */
.document-preview {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    max-height: 500px;
}

.preview-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.preview-header i {
    margin-right: 0.5rem;
}

.preview-content {
    padding: 2rem;
    background: white;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
}

.preview-content h1 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.preview-content h2 {
    font-size: 1.4rem;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.preview-content h3 {
    font-size: 1.2rem;
    color: #4b5563;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
}

.preview-content p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.preview-content ul, .preview-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.preview-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.preview-content strong {
    color: #1f2937;
    font-weight: 600;
}

.preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.preview-content table th,
.preview-content table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.preview-content table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #1f2937;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .modal-large {
        max-width: 95%;
        margin: 1rem;
    }
    
    .document-type-grid {
        grid-template-columns: 1fr;
    }
    
    .step-line {
        width: 50px;
    }
}
