/* Ãªº¿ ·¹ÀÌ¾î ¿À¹ö·¹ÀÌ */
.chatbot-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.chatbot-overlay.active {
    display: block;
}

/* Ãªº¿ ÄÁÅ×ÀÌ³Ê */
.chatbot-layer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: 80vh;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
	background: linear-gradient(to right, #e2f7fa, #f4e7f9);
}
.chatbot-layer * {
	font-family: 'Noto Sans KR' !important;
}

.chatbot-layer.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Ãªº¿ Çì´õ */
.chatbot-header {
    background-color:transparent;
    color: #000;
    padding: 20px 20px 20px 20px;
    text-align: left;
    position: relative;
}

.chatbot-header h1 {
    font-size: 26px;
    font-weight: 500 !important;
    margin: 0;
	color:#000;
	line-height:40px;
}

.chatbot-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #000;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: linear-gradient(135deg, #5488ec 0%, #7b5cff 100%);
    color: white;
}

/* Ãªº¿ ¸Þ½ÃÁö ¿µ¿ª */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
   
}

.message {
    margin-bottom: 16px;
    display: block;
}

.message.user {
    text-align: right;
}

.message.bot {
    text-align: left;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
	font-size:14px;
    line-height: 1.5;
    word-wrap: break-word;
    display: inline-block;
    max-width: 85%;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}
.message-greetings {

}
.message.user .message-bubble {
    background: linear-gradient(135deg, #5488ec 0%, #7b5cff 100%);
    color: white;
    border-bottom-right-radius: 4px;
    text-align: left;
}

.message.bot .message-bubble {
    white-space: pre-wrap;
    background: white;
    color: #333;
    border-top-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Å¸ÀÌÇÎ ÀÎµðÄÉÀÌÅÍ */
.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    max-width: 70px;
}

.typing-indicator.active {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* µð¹ö±× Á¤º¸ */
.debug-info {
    display: none;
    margin-top: 8px;
    padding: 8px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 0.75rem;
}

.debug-info.visible {
    display: block;
}

.debug-info summary {
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.debug-info .faq-list {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.debug-info .faq-item {
    padding: 6px;
    margin: 4px 0;
    background: white;
    border-radius: 4px;
    font-size: 0.7rem;
}

.debug-info .score {
    color: #667eea;
    font-weight: 600;
}

/* FAQ Âü°í ¸ñ·Ï */
.faq-references {
    margin-top: 12px;
    padding: 12px;
    border-radius: 18px;
	background:#fff;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.faq-references-title {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.faq-references-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.faq-reference-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 8px;
    background: #fafafa;
    border-radius: 6px;
    transition: background 0.2s;
}

.faq-reference-item:hover {
    background: linear-gradient(to right, #e2f7fa, #f4e7f9);
}

.faq-reference-number {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    background:#5488ec;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.faq-reference-item-icon {
	width: 24px;
    height: 24px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
	background-image: url("data:image/svg+xml;utf8,\
	<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235488ec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'>\
	<path d='M9 18h6'/>\
	<path d='M10 22h4'/>\
	<path d='M12 2a7 7 0 0 0-4 12c.7.6 1 1.2 1 2h6c0-.8.3-1.4 1-2a7 7 0 0 0-4-12z'/>\
	</svg>");
}
.faq-reference-link {
    flex: 1;
    color: #495057;
    text-decoration: none;
    line-height: 1.4;
    word-break: break-word;
}

.faq-reference-link:hover {
    color: #667eea;
    text-decoration: underline;
}

/* AI »ç¿ë ¾ÆÀÌÄÜ */
.ai-used-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 1rem;
    cursor: help;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Ãªº¿ ÀÔ·Â ¿µ¿ª */
.chatbot-input-container {
    padding: 16px;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
}

.chatbot-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
	color:#000;
}

.chatbot-input-wrapper input::placeholder {
    color: rgba(84, 136, 236, 1.0);
}

.chatbot-input-wrapper input:focus {
    border-color: #5488ec;
}

.chatbot-input-wrapper input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.chatbot-input-wrapper button {
    padding: 12px 24px;
   background: linear-gradient(135deg, #5488ec 0%, #7b5cff 100%);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    transition: transform 0.2s, opacity 0.2s;
}

/*.chatbot-input-wrapper button:hover {
    transform: scale(1.05);
}*/

/*.chatbot-input-wrapper button:active {
    transform: scale(0.95);
}*/

.chatbot-input-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ½ºÅ©·Ñ¹Ù ½ºÅ¸ÀÏ */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ¹ÝÀÀÇü */
@media (max-width: 768px) {
    .chatbot-layer {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .message-bubble {
        max-width: 80%;
    }
}
