/* BanaSiteYap Conversational Chatbot Styles */

.faq-chatbot-container {
    z-index: 9999;
}

.chatbot-toggle {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45);
}

.chatbot-window {
    width: 400px;
    height: 560px;
    max-height: calc(100vh - 110px);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    background: #ffffff;
}

.chatbot-header {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    padding: 15px 18px;
    gap: 10px;
    flex-shrink: 0;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.bot-info > i {
    font-size: 24px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bot-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.bot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.1;
}

.bot-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
    flex-shrink: 0;
}

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

.reset-bot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.reset-bot:hover {
    background: rgba(255, 255, 255, 0.26);
}

.reset-bot:active {
    transform: scale(0.97);
}

.reset-bot i {
    font-size: 14px;
}

.close-bot {
    flex-shrink: 0;
}

.chatbot-messages {
    padding: 16px;
    gap: 12px;
    background: #f8fafc;
    scroll-behavior: smooth;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: none;
}

.bot-message,
.user-message {
    padding: 12px 15px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 88%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    animation: bsyMsgFadeIn 0.22s ease;
}

.bot-message {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    border-bottom-left-radius: 4px;
}

.user-message {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.bot-rich-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bot-p {
    margin: 0;
}

.bot-p strong {
    color: #0f172a;
    font-weight: 700;
}

.bot-spacer {
    height: 4px;
}

.bot-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 2px;
}

.bot-bullet-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: 8px;
    flex-shrink: 0;
}

/* Price Breakdown Card inside Bot Bubble */
.bot-price-card {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    overflow: hidden;
}

.bot-price-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12.5px;
    font-weight: 700;
    border-bottom: 1px solid #dbeafe;
}

.bot-price-card-header i {
    font-size: 15px;
}

.bot-price-rows {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bot-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 12.5px;
    color: #334155;
}

.bot-price-row-label {
    flex: 1;
    min-width: 0;
}

.bot-price-row-val {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.bot-price-row.multiplier {
    padding-top: 5px;
    border-top: 1px dashed #cbd5e1;
    color: #1d4ed8;
    font-weight: 600;
}

.bot-price-card-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #ffffff;
    border-top: 1px solid #dbeafe;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.bot-price-total-amount {
    font-size: 15px;
    font-weight: 800;
    color: #2563eb;
    white-space: nowrap;
}

.bot-price-note {
    padding: 0 12px 8px;
    background: #ffffff;
    font-size: 11px;
    color: #64748b;
}

/* CTA Action Buttons */
.bot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.bot-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bot-action-btn.primary {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
}

.bot-action-btn.primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.bot-action-btn.secondary {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.bot-action-btn.secondary:hover {
    background: #dbeafe;
}

/* Quick Reply Chips */
.bot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-self: flex-start;
    max-width: 96%;
    animation: bsyMsgFadeIn 0.22s ease;
}

.bot-chip-btn {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 6px 12px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.3;
}

.bot-chip-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Typing Indicator */
.bot-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: bsyTypingPulse 1.1s infinite ease-in-out;
}

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

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

/* Input Area Polish */
.chatbot-input {
    padding: 12px 14px;
    gap: 9px;
    flex-shrink: 0;
}

.chatbot-input input {
    font-size: 13.5px;
    padding: 11px 13px;
    color: #0f172a;
    background: #f8fafc;
}

.chatbot-input input:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.chatbot-input button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

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

@keyframes bsyTypingPulse {
    0%, 80%, 100% {
        transform: scale(0.72);
        opacity: 0.45;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 500px) {
    .chatbot-window {
        width: calc(100vw - 24px);
        right: -8px;
        bottom: 72px;
        height: 74vh;
        max-height: 600px;
    }

    .faq-chatbot-container {
        bottom: 18px;
        right: 18px;
    }

    .bot-message,
    .user-message {
        max-width: 92%;
    }
}

@media (max-width: 390px) {
    .reset-bot-label {
        display: none;
    }

    .reset-bot {
        width: 32px;
        padding: 0;
        justify-content: center;
    }
}
