/* WebsiteBot Chatbot Styling - Migrated to Plugin */

/* Launcher Icon */
#websitebot-launcher {
    position: fixed;
    bottom: 15px;
    /* Adjusting slightly for plugin feel */
    left: var(--websitebot-pos-left, auto);
    right: var(--websitebot-pos-right, 15px);
    width: 60px;
    height: 60px;
    background: var(--websitebot-primary, #2271b1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: transform 0.3s, background 0.3s;
}

#websitebot-launcher:hover {
    transform: scale(1.1);
    background: #135e96;
}

#websitebot-launcher i {
    font-size: 28px;
}

/* Chat Window */
#websitebot-window {
    position: fixed;
    bottom: 15px;
    left: var(--websitebot-pos-left, auto);
    right: var(--websitebot-pos-right, 15px);
    width: var(--websitebot-width, 300px);
    height: var(--websitebot-height, 400px);
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#websitebot-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
#websitebot-header {
    height: 50px;
    background: var(--websitebot-header-bg, #161b22);
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    color: #e6edf3;
}

.websitebot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.websitebot-header-left i {
    color: #2271b1;
    font-size: 18px;
}

.websitebot-header-left span {
    font-weight: 700;
    letter-spacing: 0.5px;
}

#websitebot-close {
    cursor: pointer;
    color: #8b949e;
    transition: color 0.3s;
    font-size: 18px;
}

#websitebot-close:hover {
    color: #f85149;
}

/* Chat Area */
#websitebot-chat-area {
    flex: 1;
    min-height: 250px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0d1117;
}

/* Custom Scrollbar */
#websitebot-chat-area::-webkit-scrollbar {
    width: 5px;
}

#websitebot-chat-area::-webkit-scrollbar-track {
    background: transparent;
}

#websitebot-chat-area::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
}

#websitebot-chat-area::-webkit-scrollbar-thumb:hover {
    background: #2271b1;
}

/* Date/Time Separator */
.websitebot-date-separator {
    font-size: 12px;
    color: #8b949e;
    text-align: center;
    margin: 10px 0;
}

/* Typing Effect */
.websitebot-typing {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: #161b22;
    border-radius: 12px;
    width: max-content;
    align-self: flex-start;
}

.websitebot-typing span {
    width: 6px;
    height: 6px;
    background: #8b949e;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.websitebot-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.websitebot-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Message Bubbles */
.websitebot-message {
    max-width: 80%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.websitebot-bot {
    align-self: flex-start;
}

.websitebot-user {
    align-self: flex-end;
}

.websitebot-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.websitebot-avatar-wrap i,
.websitebot-avatar-img {
    width: var(--websitebot-avatar-size, 24px);
    height: var(--websitebot-avatar-size, 24px);
    background: var(--websitebot-primary, #2271b1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--websitebot-avatar-size, 24px) / 2);
    object-fit: cover;
}

.websitebot-bot-name {
    font-size: 11px;
    font-weight: 600;
    color: #58a6ff;
}

.websitebot-text {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: var(--websitebot-font-size, 14px);
    line-height: 1.4;
}

.websitebot-bot .websitebot-text {
    background: var(--websitebot-bot-bubble, #161b22);
    color: #e6edf3;
    border-bottom-left-radius: 2px;
}

.websitebot-user .websitebot-text {
    background: var(--websitebot-user-bubble, #2271b1);
    color: white;
    border-bottom-right-radius: 2px;
}

.websitebot-time {
    font-size: 8px;
    color: #8b949e;
    margin-top: 4px;
}

.websitebot-user .websitebot-time {
    text-align: right;
}

/* Bot Options Area */
.websitebot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.websitebot-option-btn {
    background: #1c2128;
    border: 1px solid #30363d;
    color: #58a6ff;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    line-height: 1;
}

.websitebot-option-btn i {
    font-size: 14px;
}

.websitebot-option-btn span {
    font-weight: 500;
}

.websitebot-option-btn:hover {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.websitebot-msg-trigger {
    box-shadow: none;
    outline: none;
}

/* Bottom Input Area */
#websitebot-input-area {
    height: 70px;
    background: #161b22;
    border-top: 1px solid #30363d;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
}

#websitebot-input {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 8px 15px;
    color: #e6edf3;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#websitebot-input:focus {
    border-color: var(--websitebot-primary, #2271b1);
}

#websitebot-send {
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    pointer-events: none;
}

#websitebot-send.active {
    color: var(--websitebot-primary, #2271b1);
    opacity: 1;
    pointer-events: all;
}

#websitebot-send:hover {
    transform: scale(1.1);
}