/* AI 상담 모달 스타일 */
.ai-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.ai-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.ai-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.ai-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ai-modal-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.ai-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ai-modal-close:hover {
    opacity: 1;
}

.ai-modal-body {
    padding: 30px 20px;
}

.ai-chat-container {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ai-message {
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease-out;
}

.ai-message.bot {
    text-align: left;
}

.ai-message.user {
    text-align: right;
}

.message-content {
    display: inline-block;
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ai-message.bot .message-content {
    background: #f1f3f5;
    color: #333;
    border-bottom-left-radius: 6px;
}

.ai-message.user .message-content {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 6px;
}

.ai-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.ai-option-button {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-option-button:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateY(-2px);
}

.ai-input-area {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 20px;
}

.ai-progress-bar {
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ai-progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.ai-progress-text {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
}

.ai-recommendation {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3f5 100%);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.ai-recommendation h3 {
    color: #667eea;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.ai-recommendation-content {
    white-space: pre-line;
    line-height: 1.6;
    color: #333;
}

.ai-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.ai-btn-primary, .ai-btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.9rem;
    flex: 1;
    min-width: 140px;
}

.ai-btn-primary {
    background: #667eea;
    color: white;
}

.ai-btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.ai-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.ai-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #666;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .ai-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .ai-modal-header {
        padding: 15px;
    }
    
    .ai-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .ai-modal-body {
        padding: 20px 15px;
    }
    
    .ai-action-buttons {
        flex-direction: column;
    }
    
    .ai-btn-primary, .ai-btn-secondary {
        min-width: auto;
        width: 100%;
    }
}