/**
 * Updated for Jenkins deployment
 * Chat Widget CSS
 * Compatible with both Hyva (Tailwind) and Luma themes
 * Uses ID selectors to avoid conflicts and ensure proper styling
 * Updated for Jenkins deployment
 * Updated for Jenkins deployment
 */

/* Chat Widget Trigger Button */
#chat-widget-trigger {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 0;
}

#chat-widget-trigger:hover {
    transform: scale(1.1);
}

#chat-widget-trigger:active {
    transform: scale(0.9);
}

#chat-widget-trigger svg {
    width: 2rem;
    height: 2rem;
    fill: #187139;
    margin-bottom: 0.125rem;
    stroke: none;
}

#chat-widget-trigger svg path {
    fill: #187139;
    stroke: none;
}

#chat-widget-trigger span {
    color: #187139;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Chat Widget Container */
#chat-widget-container {
    position: fixed;
    bottom: 6rem;
    right: 1.25rem;
    width: 24rem;
    max-width: calc(100vw - 2.5rem);
    height: 500px;
    max-height: calc(100vh - 7.5rem);
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

#chat-widget-container:not(.hidden) {
    display: flex;
}

/* Chat Widget Header */
#chat-widget-header {
    background-color: #187139;
    color: #ffffff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-widget-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

#chat-widget-close {
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-widget-close:hover {
    opacity: 0.8;
}

/* Chat Messages Container */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background-color: #f3f4f5;
}

/* Chat Input Container */
#chat-input-container {
    padding: 1rem;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
}

#chat-message-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    resize: none;
    font-family: inherit;
    font-size: 0.875rem;
    min-height: 2.5rem;
    max-height: 6rem;
}

#chat-message-input:focus {
    outline: none;
    border-color: #187139;
}

#chat-send-button {
    margin-top: 0.625rem;
    width: 100%;
    padding: 0.625rem;
    background-color: #187139;
    color: #ffffff;
    border: 0;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#chat-send-button:hover {
    background-color: #005d22;
}

#chat-send-button:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* Chat Contact Form Container */
#chat-contact-form-container {
    padding: 1rem;
    background-color: #fef3c7;
    border-top: 1px solid #e5e7eb;
    display: none;
}

#chat-contact-form-container:not(.hidden) {
    display: block;
}

#chat-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

#chat-contact-name,
#chat-contact-email {
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

#chat-contact-form button[type="submit"] {
    padding: 0.625rem;
    background-color: #187139;
    color: #ffffff;
    border: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

#chat-contact-form button[type="submit"]:hover {
    background-color: #005d22;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #chat-widget-container {
        width: calc(100vw - 2.5rem);
        right: 1.25rem;
        left: 1.25rem;
    }
}

