/* ==========================================================================
   JMG Santa Chat - Main Stylesheet
   Version: 1.8.3
   ========================================================================== */

.jmg-santa-wrapper {
    max-width: 480px;
    margin: 20px auto;
    border: 2px solid #c0392b;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.jmg-santa-header {
    background: #c0392b;
    color: #ffffff;
    padding: 15px;
    text-align: center;
}

.jmg-santa-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.jmg-santa-body {
    padding: 20px;
}

/* --------------------------------------------------------------------------
   Pre-Chat Lead Registration Form
   -------------------------------------------------------------------------- */

.jmg-lead-welcome h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.jmg-form-group {
    margin-bottom: 12px;
}

.jmg-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333333;
}

.jmg-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.jmg-error-msg {
    color: #c0392b;
    font-size: 0.85rem;
    margin-bottom: 10px;
    text-align: center;
}

/* --- HARDCODED SUBMIT BUTTON (Christmas Red -> Holly Green) --- */
.jmg-santa-wrapper .jmg-submit-btn,
button#jmg-start-chat-btn.jmg-submit-btn {
    width: 100% !important;
    background-color: #c0392b !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin-top: 10px !important;
    transition: background-color 0.25s ease-in-out, transform 0.1s ease !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
    display: block !important;
}

.jmg-santa-wrapper .jmg-submit-btn:hover,
button#jmg-start-chat-btn.jmg-submit-btn:hover {
    background-color: #27ae60 !important;
    color: #ffffff !important;
}

.jmg-santa-wrapper .jmg-submit-btn:active,
button#jmg-start-chat-btn.jmg-submit-btn:active {
    background-color: #1e8449 !important;
    transform: translateY(1px) !important;
}

.jmg-santa-wrapper .jmg-submit-btn:disabled,
button#jmg-start-chat-btn.jmg-submit-btn:disabled {
    background-color: #bdc3c7 !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
}

/* --------------------------------------------------------------------------
   Live Santa Chat Screen & Distinct Chat Bubbles
   -------------------------------------------------------------------------- */

.jmg-santa-chat-box {
    height: 380px;
    overflow-y: auto;
    padding: 15px;
    background: #f4f6f7 !important;
    display: flex;
    flex-direction: column;

    /* Firefox Scrollbar Support */
    scrollbar-width: thin;
    scrollbar-color: #c0392b transparent;
}

/* --- CUSTOM SANTA SLIDE BAR (Webkit Scrollbar) --- */
.jmg-santa-chat-box::-webkit-scrollbar {
    width: 8px; /* Width for the round thumb */
}

/* 1px Thin Holly Green Line Track */
.jmg-santa-chat-box::-webkit-scrollbar-track {
    background: transparent;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: inset 1px 0 0 #27ae60, inset -1px 0 0 #27ae60; /* Solid 1px green guide line */
}

/* Round Red Christmas Bubble Thumb */
.jmg-santa-chat-box::-webkit-scrollbar-thumb {
    background-color: #c0392b;
    border-radius: 10px;
    border: 1px solid #ffffff; /* White outer rim for contrast */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.jmg-santa-chat-box::-webkit-scrollbar-thumb:hover {
    background-color: #a93226;
}

/* PIN AVATARS TO TOP OF CHAT BUBBLES */
.jmg-msg-row {
    display: flex;
    align-items: flex-start !important;
    margin-bottom: 14px;
    width: 100%;
}

.santa-row {
    justify-content: flex-start;
}

.user-row {
    justify-content: flex-end;
}

/* AVATAR STYLING */
.jmg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin-top: 2px;
}

.santa-row .jmg-avatar {
    margin-right: 10px;
}

.user-row .jmg-avatar {
    margin-left: 10px;
}

.user-avatar-badge {
    background: #ffffff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* CHAT BUBBLE BASE STYLING */
.jmg-message {
    max-width: 75%;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    word-wrap: break-word;
}

/* SANTA'S BUBBLE (White Container with Red Border) */
.santa-message {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: 2px solid #c0392b !important;
    border-radius: 4px 16px 16px 16px !important;
}

/* USER'S BUBBLE (Holly Green Container with Dark Green Border) */
.user-message {
    background-color: #27ae60 !important;
    color: #ffffff !important;
    border: 2px solid #1e8449 !important;
    border-radius: 16px 4px 16px 16px !important;
}

.user-message * {
    color: #ffffff !important;
}

/* Chat Input Bar */
.jmg-santa-input-area {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
}

.jmg-santa-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-right: 8px;
}

.jmg-santa-input-area button {
    background-color: #c0392b;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.jmg-santa-input-area button:hover {
    background-color: #a93226;
}