/* --- Floating Button --- */
#arrk-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #000; /* Arrk Black */
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 99999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#arrk-chat-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Main Widget Window --- */
#arrk-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none; /* Hidden by default */
    flex-direction: column;
    z-index: 99998;
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border: 1px solid #f0f0f0;
}

/* --- Header --- */
.arrk-chat-header {
    background: #000;
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.header-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50; /* Green active dot */
    border-radius: 50%;
    display: inline-block;
}

.close-chat {
    cursor: pointer;
    font-size: 24px;
    line-height: 20px;
    opacity: 0.8;
}

.close-chat:hover {
    opacity: 1;
}

/* --- Messages Area --- */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Message Bubbles --- */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* User Bubble */
.message.user {
    background: #f0f0f0;
    color: #333;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Bot Bubble */
.message.bot {
    background: #fff;
    color: #111;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Links in bot messages */
.message.bot a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}
.message.bot a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.message.loading {
    color: #888;
    font-style: italic;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* --- Input Area --- */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

#chat-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #000;
}

.input-footer {
    margin-top: 8px;
    font-size: 11px;
    color: #999;
    text-align: right;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #arrk-chat-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: none;
    }
    #arrk-chat-trigger {
        bottom: 20px;
        right: 20px;
    }
}