:root {
    --wurx-coal: #151716;
    /* Primary Black */
    --wurx-rust: #B7410E;
    /* Primary Accent (Orange/Red) */
    --wurx-iron: #61666A;
    /* Secondary Gray */
    --wurx-white: #ffffff;
    --wurx-light-gray: #f4f4f4;
}

/* Floating Button */
.wurx-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--wurx-coal);
    /* Changed to Coal */
    border: 2px solid var(--wurx-rust);
    /* Added Rust Border */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    overflow: hidden;
}

.wurx-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(183, 65, 14, 0.4);
    /* Rust Glow */
}

.wurx-chat-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Chat Window */
.wurx-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--wurx-white);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid var(--wurx-iron);
}

.wurx-chat-window.hidden {
    display: none;
}

/* Header */
.wurx-chat-header {
    background: var(--wurx-coal);
    color: var(--wurx-white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--wurx-rust);
    /* Rust accent line */
}

.wurx-chat-header .title {
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.wurx-chat-header .close-btn {
    background: none;
    border: none;
    color: var(--wurx-iron);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.wurx-chat-header .close-btn:hover {
    color: var(--wurx-rust);
}

/* Body */
.wurx-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--wurx-light-gray);
}

/* Initial Choices */
.choice-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.choice-container p {
    color: var(--wurx-coal);
    font-weight: 500;
    margin-bottom: 5px;
}

.choice-btn {
    padding: 12px;
    background: var(--wurx-white);
    color: var(--wurx-coal);
    border: 1px solid var(--wurx-iron);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.choice-btn:hover {
    background: var(--wurx-rust);
    color: var(--wurx-white);
    border-color: var(--wurx-rust);
}

.choice-btn.whatsapp {
    background: #25D366;
    color: white;
    border: none;
    text-decoration: none;
}

.choice-btn.whatsapp:hover {
    background: #1faf53;
}

/* Messages */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.message.bot {
    align-self: flex-start;
    background: var(--wurx-white);
    color: var(--wurx-coal);
    border: 1px solid #e0e0e0;
    border-top-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.user {
    align-self: flex-end;
    background: var(--wurx-rust);
    color: var(--wurx-white);
    border-top-right-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Footer */
.wurx-chat-footer {
    padding: 10px;
    background: var(--wurx-white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.wurx-chat-footer input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--wurx-iron);
    border-radius: 20px;
    outline: none;
    color: var(--wurx-coal);
}

.wurx-chat-footer input:focus {
    border-color: var(--wurx-rust);
}

.wurx-chat-footer button {
    background: var(--wurx-rust);
    color: var(--wurx-white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background 0.3s;
}

.wurx-chat-footer button:hover {
    background: #a0360a;
    /* Darker Rust */
}

.wurx-chat-footer button:disabled {
    background: var(--wurx-iron);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Styling (Ticket & Lead) */
.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: var(--wurx-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ticket-form input,
.ticket-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--wurx-iron);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.ticket-form input:focus,
.ticket-form textarea:focus {
    border-color: var(--wurx-rust);
    outline: none;
}

.ticket-form textarea {
    min-height: 80px;
    resize: vertical;
}

.ticket-form button#create-ticket-btn,
.ticket-form button#start-sales-chat-btn {
    background: var(--wurx-coal);
    color: var(--wurx-white);
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.ticket-form button#create-ticket-btn:hover,
.ticket-form button#start-sales-chat-btn:hover {
    background: var(--wurx-rust);
    transform: translateY(-1px);
}

.ticket-form button#cancel-ticket-btn,
.ticket-form button#cancel-lead-btn {
    color: var(--wurx-iron);
    text-decoration: underline;
    cursor: pointer;
    align-self: center;
}

.ticket-form button#cancel-ticket-btn:hover,
.ticket-form button#cancel-lead-btn:hover {
    color: var(--wurx-coal);
}