/* ===== Hektaş Chatbot Widget ===== */

/* Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-700, #0F8B3E);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    background: var(--primary-800-p, #007A33);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* Chat Panel */
.chatbot-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 400px;
    height: 520px;
    background: var(--base-white, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    animation: chatbot-slide-up 0.3s ease;
}

@keyframes chatbot-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-700, #0F8B3E), var(--primary-800-p, #007A33));
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.chatbot-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-avatar svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.chatbot-header-title {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.chatbot-header-subtitle {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    line-height: 1;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--gray-25, #FCFCFD);
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--gray-200, #EAECF0);
    border-radius: 4px;
}

/* Message Bubbles */
.chatbot-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message--user {
    align-self: flex-end;
    background: var(--primary-700, #0F8B3E);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-message--assistant {
    align-self: flex-start;
    background: var(--base-white, #fff);
    color: var(--gray-700, #344054);
    border: 1px solid var(--gray-100, #F2F4F7);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chatbot-message--assistant a {
    color: var(--primary-700, #0F8B3E);
    text-decoration: underline;
}

.chatbot-message--assistant strong {
    font-weight: 600;
    color: var(--gray-900, #101828);
}

/* Product Card */
.chatbot-product-card {
    background: var(--base-white, #fff);
    border: 1px solid var(--gray-200, #EAECF0);
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
    transition: border-color 0.2s;
}

.chatbot-product-card:hover {
    border-color: var(--primary-400, #4EB86C);
}

.chatbot-product-card-name {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900, #101828);
    margin-bottom: 4px;
}

.chatbot-product-card-detail {
    font-size: 12px;
    color: var(--gray-500, #667085);
    margin-bottom: 2px;
}

.chatbot-product-card-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-700, #0F8B3E);
    background: var(--primary-50, #E5F5E9);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.chatbot-product-card-link:hover {
    background: var(--primary-100, #C2E5CA);
    color: var(--primary-800-p, #007A33);
}

/* Typing Indicator */
.chatbot-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: var(--base-white, #fff);
    border: 1px solid var(--gray-100, #F2F4F7);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.chatbot-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-400, #98A2B3);
    animation: chatbot-bounce 1.4s infinite ease-in-out both;
}

.chatbot-typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100, #F2F4F7);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--base-white, #fff);
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    border: 1px solid var(--gray-200, #EAECF0);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: "Helvetica", sans-serif;
    outline: none;
    transition: border-color 0.2s;
    color: var(--gray-700, #344054);
    background: var(--gray-25, #FCFCFD);
}

.chatbot-input::placeholder {
    color: var(--gray-400, #98A2B3);
}

.chatbot-input:focus {
    border-color: var(--primary-400, #4EB86C);
    background: var(--base-white, #fff);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-700, #0F8B3E);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.chatbot-send:hover {
    background: var(--primary-800-p, #007A33);
}

.chatbot-send:disabled {
    background: var(--gray-200, #EAECF0);
    cursor: not-allowed;
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Welcome Message */
.chatbot-welcome {
    text-align: center;
    padding: 20px 16px;
}

.chatbot-welcome-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-50, #E5F5E9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.chatbot-welcome-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-700, #0F8B3E);
}

.chatbot-welcome-title {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-900, #101828);
    margin-bottom: 4px;
}

.chatbot-welcome-text {
    font-size: 13px;
    color: var(--gray-500, #667085);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-panel {
        width: calc(100vw - 16px);
        height: calc(100vh - 120px);
        bottom: 84px;
        right: 8px;
        border-radius: 12px;
    }

    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
}
