/* 営業方針AI・メンバー育成 共通スタイル */

.strategy-view,
.coaching-view {
    padding: 2rem;
}

.strategy-intro,
.coaching-intro {
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 2rem;
}

.strategy-intro p,
.coaching-intro p {
    margin: 0.5rem 0;
    color: var(--color-text-secondary);
}

/* チャットコンテナ */
.strategy-chat-container,
.coaching-chat-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.strategy-chat-history,
.coaching-chat-history {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--color-bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.chat-message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--color-success) 0%, #38a169 100%);
    color: white;
}

.message-content {
    flex: 1;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f7ff 100%);
}

.message-text {
    color: var(--color-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.message-time {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 入力エリア */
.strategy-input-area,
.coaching-input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.strategy-input-area textarea,
.coaching-input-area textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
}

.strategy-input-area textarea:focus,
.coaching-input-area textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.strategy-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* メンバー選択 */
.member-selector-area {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-selector-area label {
    font-weight: 600;
    color: var(--color-text);
}

/* 育成コンテンツ */
.coaching-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.coaching-history-section,
.coaching-ai-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.coaching-history-section h3,
.coaching-ai-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 育成履歴カード */
.coaching-history-list {
    max-height: 600px;
    overflow-y: auto;
}

.coaching-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.coaching-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.coaching-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.coaching-date {
    font-weight: 600;
    color: var(--color-text);
}

.coaching-type-badge {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.coaching-card-body {
    margin-bottom: 0.8rem;
}

.coaching-field {
    margin-bottom: 0.8rem;
}

.coaching-field strong {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.coaching-field p {
    color: var(--color-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.coaching-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .coaching-content {
        grid-template-columns: 1fr;
    }
    
    .strategy-actions {
        flex-direction: column;
    }
    
    .strategy-actions button,
    .coaching-input-area button {
        width: 100%;
    }
    
    .member-selector-area {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .member-selector-area select {
        width: 100%;
    }
}
