/* SDC Chatbot Widget Styles */

:root {
    --primary-color: #0055EF;
    --text-color: #333;
    --border-color: #ddd;
    --bg-light: #f5f5f5;
}

#sdc-chatbot-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    bottom: 20px;
    width: 60px;
    height: 60px;
    overflow:visible;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-right {
    right: 20px;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-left {
    left: 20px;
}

/* Toggle Button */
.sdc-chatbot-toggle{

background:#1363DF;

width:60px;
height:60px;

border-radius:50%;

display:flex;
align-items:center;
justify-content:center;

overflow:hidden;
}

.sdc-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Teaser bubble (like "Chat with us") */
.sdc-chatbot-teaser {
    position: absolute;
    bottom: 14px;
    background: white;
    color: var(--text-color);
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    animation: teaserFadeIn 0.5s ease-out 1s both;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-right .sdc-chatbot-teaser {
    right: 72px;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-left .sdc-chatbot-teaser {
    left: 72px;
}

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

.sdc-chatbot-teaser.hidden {
    display: none;
}

.sdc-chatbot-toggle img{

width:100%;
height:100%;

object-fit:cover;

border-radius:0;
}

.sdc-chatbot-toggle{
    background:#1363DF;
}

/* Chat Window */
#chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    width: 360px;
    height: 450px;
    max-height: 450px;
    min-height: 450px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    box-sizing: border-box;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-left #chatbot-window {
    left: 0;
    right: auto;
}

#sdc-chatbot-widget.sdc-chatbot-position-bottom-right #chatbot-window {
    right: 0;
    left: auto;
}

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

/* Header */
.sdc-chatbot-header {
    background: var(--primary-color);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sdc-chatbot-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sdc-chatbot-header-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.sdc-chatbot-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 0.8;
}

/* Messages */
.sdc-chatbot-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: var(--bg-light);
    min-height: 0;
    box-sizing: border-box;
}

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

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

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

.bot-message p {
    background: white;
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    margin: 0;
    border: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.message p a {
    color: var(--primary-color);
    text-decoration: underline;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.user-message p a {
    color: white;
}

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

.user-message p {
    background: var(--primary-color);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Input Area */
.sdc-chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: white;
    flex-shrink: 0;
    box-sizing: border-box;
}

#chatbot-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

#chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 85, 239, 0.1);
}

#send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#send-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

#send-btn:active {
    transform: scale(0.98);
}

/* Scrollbar styling */
.sdc-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.sdc-chatbot-messages::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.sdc-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sdc-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile responsive */
@media (max-width: 480px) {
       #chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
        max-height: 500px;
    }
    
    .sdc-chatbot-toggle,
#sdc-chatbot-widget {
    width: 50px;
    height: 50px;
}

.sdc-chatbot-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
}

/* Path-style navigation hints (replaces raw links) */
.sdc-chatbot-path {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 10px;
    background: #eef4ff;
    border-left: 3px solid var(--sdc-chatbot-primary, #0055EF);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
}
