/**
 * ai_modal_simple.css
 * シンプルなAI検索モーダルスタイル
 */

/* オーバーレイ */
.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* モーダルコンテナ */
.ai-modal-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

/* ステップ */
.ai-step {
    text-align: center;
}

.ai-step h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.ai-step p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.ai-note {
    font-size: 14px !important;
    color: #999 !important;
}

/* ステップヘッダー */
.ai-step-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* スピナー */
.ai-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 情報テーブル */
.ai-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: left;
}

.ai-info-table th {
    padding: 12px;
    background: #f5f5f5;
    font-weight: bold;
    width: 30%;
    border-bottom: 1px solid #ddd;
}

.ai-info-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.ai-info-table tr:last-child td,
.ai-info-table tr:last-child th {
    border-bottom: none;
}

.ai-info-table strong {
    color: #667eea;
    font-size: 18px;
}

.ai-info-table a {
    color: #667eea;
    text-decoration: none;
}

.ai-info-table a:hover {
    text-decoration: underline;
}

/* ボタングループ */
.ai-button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* ボタン */
.ai-btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.ai-btn-secondary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    color: #666;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* 進捗バー */
.ai-progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0 10px 0;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    position: relative;
}

.ai-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-progress-text {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.ai-progress-message {
    text-align: center;
    font-size: 14px;
    color: #666;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 成功メッセージ */
.ai-success-message {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-left: 4px solid #4CAF50;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.ai-success-message p {
    margin: 10px 0;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-success-message p::before {
    content: '✓';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
}

/* 既存大会情報 */
.ai-existing-info {
    background: #f1f8f4;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.ai-existing-info p {
    margin: 10px 0;
    color: #2e7d32;
}

/* エラーボックス */
.ai-error-box {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    color: #c62828;
    text-align: left;
    line-height: 1.6;
}

/* 閉じるボタン */
.ai-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 5px 10px;
    transition: color 0.2s;
}

.ai-close-btn:hover {
    color: #333;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ai-modal-container {
        padding: 30px 20px;
        width: 95%;
    }
    
    .ai-step h2 {
        font-size: 20px;
    }
    
    .ai-btn-primary,
    .ai-btn-secondary {
        font-size: 14px;
        padding: 12px;
    }
}
