/* Chatbot wrapper */
.chatbot-wrapper {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-greeting {
    background: linear-gradient(135deg, #234DD4 0%, #0A2357 100%);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(35, 77, 212, 0.2);
    display: block;
    font-weight: 500;
}

.chatbot-greeting .chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 10px;
    vertical-align: middle;
}


/* Chatbot logo/icon */
.chatbot-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #234DD4 0%, #0A2357 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(35, 77, 212, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chatbot-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(35, 77, 212, 0.4);
}

.chatbot-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    padding: 0;
}

.chatbot-container {
    width: 380px;
    max-height: 60vh;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    min-height: 400px;
    display: flex;
    font-size: 14px;
    overflow: hidden;
}

/* Chatbot header */
.chatbot-header {
    background: linear-gradient(135deg, #234DD4 0%, #0A2357 100%);
    color: #ffffff;
    padding: 18px 15px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-header button.chatbot-close {
    padding: 2px 2px;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
}

.chatbot-close:hover {
    color: #ccc;
}

/* Chatbot messages */
.chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 60vh;
    word-wrap: break-word;
    background: #fafbfc;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #234DD4;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #1c3da8;
}

/* Chatbot message styling */
.chatbot-message {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 75%;
    float: right;
    width: auto;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header button.chatbot-close svg {
    width: 12px;
    height: 12px;
}

.chatbot-message.user {
    background: linear-gradient(135deg, #234DD4 0%, #1c3da8 100%);
    margin-left: 20%;
    text-align: right;
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.chatbot-message.bot {
    background: #f5f7fa;
    margin-right: 20%;
    text-align: left;
    border-bottom-left-radius: 0;
    float: left;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.6;
}

/* Chatbot input */
.chatbot-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e8eaed;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
}

.chatbot-input textarea#userInput {
    min-height: 50px;
    font-size: 14px;
    resize: none;
    outline: none;
    color: #d1d5db;
    font-family: var(--e-global-typography-accent-font-family), Sans-serif;
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    line-height: var(--e-global-typography-accent-line-height);
    letter-spacing: var(--e-global-typography-accent-letter-spacing);

    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #d1d5db;

    border-radius: 12px;
    width: 100%;
    padding: 10px 14px;
    transition: border-color 0.3s ease;
}

.chatbot-input textarea#userInput:focus {
    border-color: #234DD4;
    box-shadow: 0 0 0 3px rgba(35, 77, 212, 0.1);
}

.chatbot-input button {
    background: transparent !important;
    border: none !important;
    min-width: initial !important;
    width: initial !important;
    padding: 8px;
    min-height: initial;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.chatbot-input button:hover {
    background: rgba(35, 77, 212, 0.1) !important;
    transform: scale(1.1);
}

.chatbot-input button:active {
    transform: scale(0.95);
}

.chatbot-input button svg {
    display: block;
    transition: all 0.3s ease;
}

.chatbot-input button:hover svg path {
    fill: #1c3da8;
}

.chatbot-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}

.chatbot-input input:invalid {
    border-color: #234DD4;
}

.chatbot-input button {
    padding: 8px 15px;
    border: none;
    background: #234DD4;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 14px;
    min-width: 60px;
}

.chatbot-input button:hover {
    background: #1c3da8;
}

.chatbot-close-clear button.chatbot-clear {
    font-size: 10px;
    padding: 6px 10px;
    background: #234DD4;
    font-family: var(--e-global-typography-accent-font-family), Sans-serif;
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    line-height: var(--e-global-typography-accent-line-height);
    letter-spacing: var(--e-global-typography-accent-letter-spacing);
    color: #FFFFFF;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #7A7A7A;
    border-radius: 15px;
}

.chatbot-close-clear {
    display: flex;
    align-items: center;
    gap: 7px;
}

.chatbot-header button.chatbot-close svg {
    display: block;
}

@media(min-width:750px) {
    .chatbot-logo {
        width: 70px;
        height: 70px;
    }
}

@media(max-width:749px) {
    .chatbot-container {
        width: 270px;
    }
}