/* 챗봇 기본 스타일 */
:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --gradient: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    --gray-50: #FAFAF7;
    --gray-100: #F3F4F6;
    --gray-200: #E5E5EA;
    --gray-600: #6E6E73;
    --gray-800: #1C1C1E;
}

.chatbot-icon {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(255,107,53,0.3);
    z-index: 9998;
    transition: all 0.3s ease;
}

.chatbot-icon:hover { transform: scale(1.1); }

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.hidden { display: none; }

.chatbot-header {
    background: var(--gradient);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar-small {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.status-online {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.9;
}

.status-online i { font-size: 8px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.language-selector {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.lang-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lang-btn:hover { background: rgba(255,255,255,0.3); }
.lang-btn.active { background: rgba(255,255,255,0.4); }

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-close:hover { 
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--gray-50);
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message { justify-content: flex-start; }
.user-message { justify-content: flex-end; }

.bot-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content { max-width: 70%; }
.user-message .message-content { text-align: right; }

.message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 14px;
    line-height: 1.5;
}

.user-message .message-text {
    background: var(--gradient);
    color: white;
}

.message-time {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 4px;
    padding: 0 4px;
}

.quick-replies {
    padding: 0 16px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.typing-indicator {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.typing-indicator.hidden { display: none; }

.typing-dots {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--gray-600);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-send {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gradient);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover { transform: scale(1.05); }
.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 24px);
        height: calc(100vh - 120px);
        bottom: 12px;
        right: 12px;
    }
    .chatbot-icon {
        bottom: 16px;
        right: 16px;
    }
}
