/* public/css/style.css */

/* Widget Container styles */
#hec-widget-container {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

/* Positioning classes */
.hec-position-right { right: 20px; }
.hec-position-left { left: 20px; }
.hec-position-center { 
    left: 50%;
    transform: translateX(-50%);
}

/* Floating icon styles */
#hec-open-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}
#hec-open-icon:hover {
    transform: scale(1.1);
}
#hec-open-icon svg {
    width: 32px;
    height: 32px;
}

/* Chatbot container is now hidden by default */
.chatbot-container {
    display: none;
    width: 400px; 
    height: 600px;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When the widget is open, show the chatbot and hide the icon */
#hec-widget-container.is-open .chatbot-container {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}
#hec-widget-container.is-open #hec-open-icon {
    display: none;
}

/* Close button in header */
#hec-close-icon {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}

.chatbot-header {
    background-image: linear-gradient(to right, #007bff, #0056b3);
    color: white;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
    position: relative;
}

.chatbot-header h3 {
    margin-right: 30px; 
}

.chatbot-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: #f8fafc;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    line-height: 1.4;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background-color: #dbeafe;
    color: #1e3a8a;
}

.bot-message {
    align-self: flex-start;
    background-color: #e5e7eb;
    color: #374151;
}

.chatbot-input-area {
    display: flex;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.chatbot-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 1.5rem;
    font-size: 1rem;
    outline: none;
}

.send-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 1.5rem;
    margin-left: 0.75rem;
    cursor: pointer;
}

/* Button Styles */
.quick-reply-buttons, #persistent-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    justify-content: center;
}

.quick-reply-buttons {
    margin-top: 0.75rem;
}

#persistent-buttons-container {
     border-top: 1px solid #e2e8f0;
     background-color: #f8fafc;
     padding-top: 1rem;
     padding-bottom: 1rem;
}

.quick-reply-btn {
    background-color: #fff;
    border: 1px solid #28a745;
    color: #28a745;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

#persistent-buttons-container .quick-reply-btn {
    border-color: #007bff;
    color: #007bff;
}

.back-btn {
    border-color: #6c757d;
    color: #6c757d;
}

/* Form Styles */
.form-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.form-overlay.show {
    display: flex;
}

.form-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-content h3 {
    text-align: center;
    color: #007bff;
    font-size: 1.5rem;
}

.form-content label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: -0.5rem;
}

.form-content input, .form-content textarea, .form-content select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.5rem;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-buttons button {
    flex-grow: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.submit-button {
    background-color: #28a745;
    color: white;
}

.cancel-button {
    background-color: #dc3545;
    color: white;
}
