.kit-frontend-chatbot {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Float mode specific styles */
.kit-frontend-chatbot.float-mode {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* Hide toggle when chat is active */
.kit-frontend-chatbot.float-mode .kit-chat-box.active ~ .kit-chat-toggle {
    display: none;
}

/* Inline mode specific styles */
.kit-frontend-chatbot.inline-mode {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
}

.kit-frontend-chatbot.inline-mode .kit-chat-box {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    height: 500px;
    display: flex;
}

.kit-chat-toggle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.kit-chat-toggle:hover {
    transform: scale(1.1);
}

.kit-chat-toggle i {
    color: #EA341E;
    font-size: 24px;
}

.kit-chat-toggle-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

.kit-chat-box {
    position: absolute;
    bottom: 0px;
    right: 0;
    width: min(600px, calc(100vw - 40px));
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kit-chat-box.active {
    display: flex;
}

.kit-chat-box.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    z-index: 10000;
}

@media (max-width: 768px) {
    .kit-chat-box.enlarged {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .kit-chat-header .enlarge-chat {
        display: none;
    }
}

.kit-chat-header {
    padding: 15px;
    background: #002b48;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kit-chat-header .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kit-chat-header .close-chat,
.kit-chat-header .enlarge-chat {
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: transform 0.2s ease;
}

.kit-chat-header .close-chat:hover,
.kit-chat-header .enlarge-chat:hover {
    transform: scale(1.1);
}

.kit-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.kit-chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.kit-chat-message.user {
    align-items: flex-end;
}

.kit-chat-message.bot {
    align-items: flex-start;
}

.message-header {
    font-size: 12px;
    margin-bottom: 4px;
    color: #666;
}

.kit-chat-message.user .message-header {
    text-align: right;
}

.kit-chat-message .message-content {
    max-width: 90%;
    padding: 10px 15px;
    border-radius: 15px;
    margin: 2px 0;
}

.kit-chat-message.bot .bot-name {
    font-weight: bold;
    color: #002b48;
}

.kit-chat-message.user .message-content {
    background: #002b48;
    color: white;
    border-radius: 15px 15px 0 15px;
}

.kit-chat-message.bot .message-content {
    background: #f0f0f1;
    border-radius: 15px 15px 15px 0;
}

.kit-chat-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.kit-chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}

.kit-chat-send-btn {
    background: #002b48;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.kit-chat-send-btn:hover {
    background: #001320;
}

.kit-chat-send-btn i {
    font-size: 16px;
}

.typing-indicator {
    display: none;
    padding: 10px 15px;
    background: #f0f0f1;
    border-radius: 15px 15px 15px 0;
    margin: 2px 0;
    width: fit-content;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #002b48;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.header-controls span {
    cursor: pointer;
    margin-left: 10px;
    color: white;
    transition: color 0.3s ease;
}

.header-controls span:hover {
    color: #333;
}

.email-chat i {
    font-size: 16px;
}

/* Email Popup Styles */
.kit-email-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.kit-email-popup.active {
    display: flex;
}

.kit-email-popup-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.kit-email-popup-header {
    padding: 15px;
    background: #002b48;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.kit-email-popup-close {
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: transform 0.2s ease;
}

.kit-email-popup-close:hover {
    transform: scale(1.1);
}

.kit-email-popup-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kit-email-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.kit-email-input:focus {
    border-color: #002b48;
}

.kit-email-send-btn {
    background: #002b48;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: flex-end;
}

.kit-email-send-btn:hover {
    background: #001320;
}

.save-chat-link {
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
}

.save-chat-link a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.save-chat-link a:hover {
    color: #002b48;
    text-decoration: underline;
} 