/* === ALEX AI 채팅 페이지 스타일 === */

/* --- 사이드바 레이아웃 --- */

/* 스크롤바 숨김 */
.scrollbar-hide {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* --- 타이핑 인디케이터 스타일 --- */
.typing-indicator {
    color: #6366f1;
    font-weight: 500;
}

/* --- 로딩 애니메이션 --- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 아이콘 회전 애니메이션 */
.rotating-icon {
    animation: spin 1s linear infinite;
}

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

/* --- 스트리밍 텍스트 스타일 --- */
.streaming-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6 !important;
    color: var(--text-primary) !important;
}

/* --- 마크다운 스타일링 (제미나이 스타일) --- */
.streaming-text h1, 
.streaming-text h2, 
.streaming-text h3, 
.streaming-text h4, 
.streaming-text h5, 
.streaming-text h6 {
    font-weight: 600 !important;
    margin: 0.8rem 0 0.4rem 0 !important;
    color: var(--text-primary) !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    border-bottom: none !important;
}

.streaming-text h1 { font-size: 1.1rem !important; }
.streaming-text h2 { font-size: 1.05rem !important; }
.streaming-text h3 { font-size: 0.95rem !important; }

.streaming-text p {
    margin: 0.5rem 0 !important;
    line-height: 1.5 !important;
    color: var(--text-primary) !important;
    font-size: 0.9rem !important;
}

.streaming-text ul, 
.streaming-text ol {
    margin: 0.4rem 0 !important;
    padding-left: 1.2rem !important;
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
}

.streaming-text li {
    margin: 0.1rem 0 !important;
    line-height: 1.4 !important;
    color: var(--text-primary) !important;
}

.streaming-text strong, 
.streaming-text b {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.streaming-text em, 
.streaming-text i {
    font-style: italic !important;
    color: var(--text-primary) !important;
}

.streaming-text code {
    background-color: var(--bg-secondary) !important;
    color: var(--accent) !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 0.25rem !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.9rem !important;
}

.streaming-text pre {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    padding: 1rem !important;
    border-radius: 0.5rem !important;
    overflow-x: auto !important;
    margin: 1rem 0 !important;
    border: 1px solid var(--border-color) !important;
}

.streaming-text pre code {
    background: none !important;
    padding: 0 !important;
    color: var(--text-primary) !important;
}

.streaming-text blockquote {
    border-left: 4px solid var(--accent) !important;
    padding-left: 1rem !important;
    margin: 1rem 0 !important;
    font-style: italic !important;
    color: var(--text-secondary) !important;
    background-color: var(--bg-secondary) !important;
    padding: 0.8rem 1rem !important;
    border-radius: 0.25rem !important;
}

.streaming-text table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 1rem 0 !important;
    border: 1px solid var(--border-color) !important;
}

.streaming-text th, 
.streaming-text td {
    border: 1px solid var(--border-color) !important;
    padding: 0.5rem !important;
    text-align: left !important;
    color: var(--text-primary) !important;
}

.streaming-text th {
    background-color: var(--bg-secondary) !important;
    font-weight: 600 !important;
}

/* --- 추가 마크다운 스타일 --- */
.streaming-text h2 {
    padding: 0 0 0.3rem 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* 중복 제거됨 - 위쪽의 작은 폰트 크기 설정 사용 */

.streaming-text ul li {
    list-style-type: disc !important;
}

.streaming-text ol li {
    list-style-type: decimal !important;
}

/* 첫 번째 p 태그의 상단 마진 제거 */
.streaming-text p:first-child {
    margin-top: 0 !important;
}

/* 마지막 요소의 하단 마진 제거 */
.streaming-text > *:last-child {
    margin-bottom: 0 !important;
}

/* 목록 스타일 개선 */
.streaming-text ul li::marker {
    color: #6b7280 !important;
}

.streaming-text ol li::marker {
    color: #6b7280 !important;
    font-weight: 500 !important;
}

/* 추가 스타일 강제 적용 */
.streaming-text * {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.streaming-text p:first-child, 
.streaming-text h1:first-child, 
.streaming-text h2:first-child, 
.streaming-text h3:first-child {
    margin-top: 0 !important;
}

/* --- 스크롤 컨테이너 스타일 --- */
#conversation-wrapper {
    overflow-y: auto;
    scroll-behavior: smooth;
    /* 스크롤바 숨기기 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 웹킷 브라우저에서 스크롤바 숨기기 */
#conversation-wrapper::-webkit-scrollbar {
    display: none;
}

/* --- 로그인 전 비활성화 스타일 --- */
.chat-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* --- Google 브랜딩 가이드라인에 따른 로그인 버튼 --- */
.google-signin-btn {
    font-family: 'Roboto', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 16px 12px 12px;
    min-height: 40px;
    border-radius: 4px;
    border: 1px solid #dadce0;
    background-color: #ffffff;
    color: #3c4043;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.google-signin-btn:hover {
    box-shadow: 0 2px 4px 0 rgba(60, 64, 67, 0.3), 0 3px 8px 3px rgba(60, 64, 67, 0.15);
    background-color: #f8f9fa;
}

.google-signin-btn:active {
    background-color: #f1f3f4;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.font-roboto-medium {
    font-family: 'Roboto', 'Arial', sans-serif;
    font-weight: 500;
}

/* --- 퀵 스타트 버튼 애니메이션 --- */
.quick-start-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* 사용자 메시지 폰트 크기 설정 - AI 답변과 통일 */
.user-message-content {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

/* 채팅 컨테이너 최대 너비 확장 */
#chat-container {
    max-width: 100% !important;
}

/* 채팅 메시지 최대 너비 확장 */
.chat-message {
    max-width: 100% !important;
}

/* AI 메시지 내용 최대 너비 확장 */
.ai-message-content {
    max-width: 100% !important;
}

/* 사용자 메시지 내용 최대 너비 확장 */
.user-message-content {
    max-width: 100% !important;
} 