/* Chat Widget CSS */
#creativepresslab-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}

/* Trigger Button */
.chatbot-trigger {
    background-color: #0073aa;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

.chatbot-trigger .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

/* Chat Window */
.chatbot-window {
    display: none;
    width: 350px;
    height: 500px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    flex-direction: column;
}

.chatbot-widget-closed .chatbot-window {
    display: none;
}

.chatbot-widget-open .chatbot-window {
    display: flex;
}

/* Header */
.chatbot-header {
    background: #0073aa;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-weight: bold;
}

.chatbot-controls span {
    cursor: pointer;
}

/* Body */
.chatbot-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.chatbot-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.chatbot-screen.active {
    display: flex;
}

/* Form */
.chatbot-form-group {
    margin-bottom: 15px;
}

.chatbot-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.chatbot-form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chatbot-btn {
    width: 100%;
    padding: 10px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
}

.chatbot-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.chatbot-message.visitor {
    align-self: flex-end;
    background-color: #0073aa;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.agent,
.chatbot-message.system {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: black;
    border-bottom-left-radius: 4px;
}

.chatbot-notice {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin: 10px 0;
}

.chatbot-input-area {
    display: flex;
    padding: 10px;
    background: #f9f9f9;
}

.chatbot-input-area textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    resize: none;
    height: 40px;
}

.chatbot-input-area button {
    margin-left: 10px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
}

/* Queue Notice */
.chatbot-queue-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-bottom: 1px solid #ffeeba;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    position: relative;
}