/* ============================================
   Tawk.to 채팅 위젯 커스터마이징 CSS
   ============================================ */

/* 위젯 버튼 위치 - 맨 아래 고정 */
#tawk-bubble-container {
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999 !important; /* 텔레그램 버튼보다 위 */
}

/* 위젯 메인 버튼 스타일 */
.widget-button {
    background: linear-gradient(135deg, #C5A572 0%, #a88c5e 100%) !important;
    box-shadow: 0 4px 12px rgba(197, 165, 114, 0.4) !important;
    transition: all 0.3s ease !important;
}

.widget-button:hover {
    background: linear-gradient(135deg, #a88c5e 0%, #8f7349 100%) !important;
    box-shadow: 0 6px 16px rgba(197, 165, 114, 0.6) !important;
    transform: scale(1.05) !important;
}

/* 채팅 창 헤더 커스터마이징 */
.tawk-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

/* 채팅 입력창 포커스 시 */
.tawk-input-field:focus {
    border-color: #C5A572 !important;
    box-shadow: 0 0 0 2px rgba(197, 165, 114, 0.2) !important;
}

/* 전송 버튼 스타일 */
.tawk-send-button {
    background-color: #C5A572 !important;
}

.tawk-send-button:hover {
    background-color: #a88c5e !important;
}

/* 관리자 메시지 말풍선 */
.tawk-message-agent {
    background-color: #C5A572 !important;
    color: white !important;
}

/* 사용자 메시지 말풍선 */
.tawk-message-visitor {
    background-color: #f1f3f4 !important;
    color: #2c3e50 !important;
}

/* ============================================
   위젯 크기 고정 (모든 디바이스)
   ============================================ */

/* 위젯 컨테이너 크기 고정 */
.tawk-min-container {
    width: 400px !important;
    min-width: 400px !important;
    max-width: 400px !important;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
}

/* 모바일 - 크기 고정 (작아지지 않음) */
@media (max-width: 768px) {
    .tawk-min-container {
        width: 380px !important;
        min-width: 380px !important;
        max-width: 380px !important;
        height: 580px !important;
        min-height: 580px !important;
        max-height: 580px !important;
    }
}

/* 태블릿 - 크기 고정 */
@media (min-width: 769px) and (max-width: 1024px) {
    .tawk-min-container {
        width: 400px !important;
        min-width: 400px !important;
        max-width: 400px !important;
        height: 600px !important;
        min-height: 600px !important;
        max-height: 600px !important;
    }
}

/* 데스크톱 - 크기 고정 */
@media (min-width: 1025px) {
    .tawk-min-container {
        width: 400px !important;
        min-width: 400px !important;
        max-width: 400px !important;
        height: 600px !important;
        min-height: 600px !important;
        max-height: 600px !important;
    }
}

/* 크기 변경 방지 */
.tawk-min-container,
.tawk-chat-panel,
iframe[title*="chat"] {
    transform: none !important;
    zoom: 1 !important;
    scale: 1 !important;
}

/* 알림 배지 (읽지 않은 메시지) */
.tawk-badge {
    background-color: #e74c3c !important;
    animation: tawk-pulse 2s infinite !important;
}

@keyframes tawk-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 오프라인 상태 표시 */
.tawk-offline-message {
    color: #7f8c8d !important;
    font-style: italic !important;
}

/* 타이핑 인디케이터 */
.tawk-typing-indicator {
    color: #C5A572 !important;
}

/* 파일 업로드 버튼 */
.tawk-file-button {
    color: #C5A572 !important;
}

.tawk-file-button:hover {
    color: #a88c5e !important;
}

/* 이모지 피커 */
.tawk-emoji-picker {
    border: 1px solid #C5A572 !important;
}

/* 만족도 평가 별 */
.tawk-rating-star {
    color: #f39c12 !important;
}

.tawk-rating-star:hover {
    color: #e67e22 !important;
}

/* 스크롤바 스타일링 */
.tawk-message-list::-webkit-scrollbar {
    width: 8px;
}

.tawk-message-list::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.tawk-message-list::-webkit-scrollbar-thumb {
    background: #C5A572;
    border-radius: 4px;
}

.tawk-message-list::-webkit-scrollbar-thumb:hover {
    background: #a88c5e;
}

/* 채팅 윈도우 그림자 */
.tawk-min-container {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* 애니메이션 효과 */
@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tawk-min-container {
    animation: slideIn 0.3s ease-out !important;
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .tawk-message-visitor {
        background-color: #34495e !important;
        color: #ecf0f1 !important;
    }
    
    .tawk-header {
        background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
    }
}

