/**
 * 즉석 에너지 컨설팅 페이지 전용 스타일
 * ai-project-chat.css를 기반으로 하며, 상담 직원 연결 버튼 등 추가 스타일만 포함
 */

/* ===== 페이지 타이틀 오버라이드 ===== */
.ai-chat-page .ai-chat-header .ai-chat-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    line-height: 40px;
    letter-spacing: -0.1px;
}

.ai-chat-page .ai-chat-header .ai-chat-title .enerai-title-logo {
    margin: 0;
    height: 28px;
}

.ai-chat-page .ai-chat-header .ai-chat-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: #000000;
    line-height: 24px;
}

/* ===== 예상 질문 제안 문구 (초기 안내 아래) ===== */
.chat-suggestion-label {
    margin-top: 8px;
    margin-bottom: 4px;
    padding-left: 8px;
    color: #4A636C;
    font-size: 14px;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    line-height: 16px;
    word-wrap: break-word;
}

.chat-suggestion-label + .sample-message-list {
    margin-top: 0;
}

/* ===== 샘플 메시지 버튼 목록 ===== */
.sample-message-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
}

.sample-message-btn {
    max-width: 480px;
    padding: 10px 16px;
    background: #F7F8F9;
    border-radius: 16px;
    border: none;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    color: #304248;
    font-size: 14px;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    line-height: 20px;
    word-break: keep-all;
    text-align: left;
}

.sample-message-btn:hover {
    background: #E2E5EC;
}

/* ===== 상담 직원 연결하기 버튼 ===== */
.connect-staff-btn {
    background: #304248 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 24px;
    width: 156px;
    height: 38px;
}

.connect-staff-btn:hover {
    background: #1a2a30 !important;
}

/* ===== 추천 태그 뱃지 (즉석 컨설팅 전용 - 배경색 오버라이드) ===== */
.ai-chat-page .role-tag-badges .role-badge {
    background: #F7F8F9;
    border: none;
    border-radius: 16px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #304248;
    line-height: 16px;
}

.ai-chat-page .role-tag-badges .role-badge:hover {
    background: #E2E5EC;
    color: #304248;
}

/* ===== 채널톡 오픈 시 백그라운드 블러 오버레이 ===== */
.channeltalk-blur-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    transition: opacity 0.25s ease;
    opacity: 0;
}

.channeltalk-blur-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== 입력창: textarea와 전송 버튼을 한 row에 배치 ===== */
.ai-chat-page .ai-chat-input-area {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    min-height: 80px;
    padding: 20px 30px 16px;
}

.ai-chat-page .chat-input-wrapper {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.ai-chat-page .message-input {
    min-height: 44px;
    padding: 9px 0;
    overflow-y: hidden;
}

.ai-chat-page .chat-input-actions {
    flex-shrink: 0;
    justify-content: flex-end;
}

/* ===== 초기 메시지 숨김 (저장된 대화 로드 시) ===== */
.initial-message-hidden {
    display: none !important;
}

/* ===== 상단 네비게이션 (뒤로가기 + 대화 내용 초기화) ===== */
.chat-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.chat-top-nav .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #304248;
    text-decoration: none;
}

.chat-top-nav .back-link:hover {
    color: #23AB72;
}

.chat-top-nav .reset-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-15);
    font-weight: 500;
    color: #727F85;
    text-decoration: none;
}

.chat-top-nav .reset-link:hover {
    color: #304248;
}

.chat-top-nav .reset-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23727F85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 4v6h6'/%3E%3Cpath d='M3.51 15a9 9 0 1 0 2.13-9.36L1 10'/%3E%3C/svg%3E") no-repeat center;
}

/* ===== 페이지 이탈 확인 모달 (ai-project-chat.css 구조 재사용) ===== */
/* 오버레이 배경 opacity 19% */
#leaveConfirmModal .leave-confirm-modal-overlay {
    background: rgba(0, 0, 0, 0.19) !important;
}

/* 취소 버튼 - 회색 (ai-project btn-leave 스타일) */
.leave-confirm-modal-btn-cancel {
    background: #E2E5EC !important;
    color: #304248 !important;
    border: 1px solid #E2E5EC !important;
}

.leave-confirm-modal-btn-cancel:hover {
    background: #E2E5EC !important;
}

/* 나가기 버튼 - 주황색 (페이지 이탈 확인용) */
#leaveConfirmModal .leave-confirm-modal-btn-leave {
    background: #F16E5C !important;
    color: #FFFFFF !important;
    border: none !important;
}

#leaveConfirmModal .leave-confirm-modal-btn-leave:hover {
    background: #F16E5C !important;
}
