:root {
    --cs-primary: #009df1;
    --cs-primary-hover: #ee6406;
    --cs-bg: #fff;
    --cs-text: #1f2937;
    --cs-text-light: #6b7280;
    --cs-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --cs-border: #e5e7eb;
}

#cs-chatbot-container {
    position: fixed;
    bottom: 10%;
    right: 15px;
    z-index: 115;
}

#cs-chatbot-trigger {
    width: 60px;
    height: 60px;
    background: linear-gradient(var(--angle), #00083e 0%, #003198 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--cs-shadow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#cs-chatbot-trigger:hover {
    transform: scale(1.1);
    background: var(--cs-primary);
}

#cs-chatbot-trigger svg {
    width: 30px;
    height: 30px;
}

#cs-chatbot-trigger img{
    max-width: 35px;
    position: absolute;
    left: 0;
    right: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    margin: 0 auto;
}

#cs-chatbot-trigger img.active {
    opacity: 1;
    animation: cswaveFloat 2.6s ease-in-out infinite;
    transform: scale(1.04);
}

@keyframes cswaveFloat {
    0% {
        transform: translateY(0) scale(1.04);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1.04);
    }
}

#cs-chatbot-window {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--cs-bg);
    border-radius: 16px;
    box-shadow: var(--cs-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cs-fade-in 0.3s ease-out;
}

@keyframes cs-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cs-chatbot-header {
    background: var(--cs-primary);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-chatbot-header-info{
    display: flex;
    align-items: center;
    gap: 0 10px;
}

.cs-chatbot-header-info img{
    max-width: 44px;
}

.cs-chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#cs-chatbot-reset {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}

#cs-chatbot-reset:hover {
    opacity: 1;
    transform: rotate(-20deg);
}

.cs-chatbot-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

.cs-chatbot-status {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.cs-chatbot-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
}

.cs-chatbot-close {
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    margin-top: -2px;
}

.cs-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.cs-message-bot {
    align-self: flex-start;
    background: #f3f4f6;
    color: var(--cs-text);
    border-bottom-left-radius: 2px;
}

.cs-message-bot a{
    color: var(--cs-primary);
}

.cs-message-bot a:hover{
    color: var(--cs-primary-hover);
}

/* Markdown Styling within bubbles */
.cs-message-bot p {
    margin-top: 0;
    margin-bottom: 8px;
}

.cs-message-bot p:last-child {
    margin-bottom: 0;
}

.cs-message-bot ul,
.cs-message-bot ol {
    margin: 8px 0;
    padding-left: 20px;
}

.cs-message-bot li {
    margin-bottom: 4px;
}

.cs-message-bot strong {
    font-weight: 600;
}

.cs-message-bot code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.9em;
}

.cs-message-bot pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.cs-message-bot pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.cs-message-bot blockquote {
    border-left: 3px solid var(--cs-primary);
    margin: 8px 0;
    padding-left: 12px;
    color: var(--cs-text-light);
    font-style: italic;
}

.cs-message-user {
    align-self: flex-end;
    background: var(--cs-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.cs-chatbot-input-area {
    padding: 15px;
    border-top: 1px solid var(--cs-border);
}

.cs-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cs-suggestion {
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.cs-suggestion:hover {
    background: #e5e7eb;
}

.cs-chatbot-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#cs-chatbot-input {
    flex: 1;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.90rem;
    resize: none;
    height: 40px;
    max-height: 100px;
    outline: none;
}
#cs-chatbot-input::placeholder {
  color: #333;
  opacity: 1;
}

#cs-chatbot-input:focus {
    border-color: var(--cs-primary);
}

#cs-chatbot-send {
    background: var(--cs-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cs-chatbot-send svg {
    width: 20px;
    height: 20px;
}

#cs-chatbot-send:hover{
    background: var(--cs-primary-hover);
}

#cs-chatbot-typing {
    padding: 10px 20px;
}

.dot {
    height: 6px;
    width: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    animation: 1.4s typing infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }
}

@media (min-width: 1080px){
    #cs-chatbot-window{
        bottom: 20px;
        right: 65px;
    }
}

@media (max-width: 1400px){
    #cs-chatbot-window{
        height: 500px;
    }
}

@media (max-width: 768px){
    #cs-chatbot-window{
        height: 490px;
    }
}