.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 420px;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0px 0px 15px rgba(255,255,255,0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}

.theme-btn {
    position: relative;
    z-index: 1; /* Default lower value */
}

/* Header */
.chatbot-header {
    background: #111;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header button {
    background: transparent;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
}

/* Messages */
.chatbot-messages {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    color: #ddd;
}

.bot-message {
    background: #2a2a2a;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    max-width: 85%;
}

.user-message {
    background: #444;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    align-self: flex-end;
    max-width: 85%;
    text-align: right;
}

/* Input Section */
.chatbot-input {
    display: flex;
    border-top: 1px solid #333;
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    background: #1a1a1a;
    border: none;
    color: white;
    outline: none;
}

.chatbot-input button {
    background: #fff;
    border: none;
    color: black;
    padding: 0 15px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.chatbot-input button:hover {
    background: #ccc;
}

/* Mobile responsiveness - Small screen sizes */
@media (max-width: 768px) {
    .chatbot-widget {
        width: 280px;  /* Smaller width for tablets and small screens */
        height: 380px;  /* Adjust height */
        bottom: 10px;   /* More space from the bottom */
        right: 10px;    /* More space from the right edge */
    }
}

/* Mobile portrait (up to 480px) */
@media (max-width: 480px) {
    .chatbot-widget {
        width: 80%;     /* Take up 80% of the screen width */
        height: 65vh;   /* Adjust height to 65% of the viewport height */
        bottom: 5%;     /* Reduce space from bottom */
        right: 10%;     /* Keep some margin from the right side */
        border-radius: 8px;  /* Round corners for small screens */
    }
}

/* Very small screens (extra small mobile devices) */
@media (max-width: 320px) {
    .chatbot-widget {
        width: 90%;     /* Take up 90% of screen width */
        height: 55vh;   /* Adjust height to be 55% of screen height */
        bottom: 10px;   /* Position closer to bottom */
        right: 5%;      /* Small right margin */
        border-radius: 6px;  /* Further rounded corners */
    }
}