/* Container for the chatbot */
#chatbot-container {
    display: flex;
    flex-direction: column;
    /*width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    padding: 20px;*/
    box-sizing: border-box;
    /*background-color: #e5e5ea; /* iMessage-like background */
    /*border-radius: 15px;*/
}

/* Messages area */
#chatbot-messages {
    flex-grow: 1;
    overflow-y: auto;
    /*background-color: #f9f9f9;*/
    padding: 10px;
    margin-bottom: 10px;
    /*border-radius: 15px;
    border: none;*/
}

/* Message bubbles */
.message {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
    display: inline-block;
    position: relative;
    clear: both;
    word-wrap: break-word;
}

/* User's messages aligned to the right */
.message.user {
    background-color: #0084ff; /* Blue for user messages (iMessage-like) */
    color: white;
    float: right; /* Align to the right */
    text-align: right;
    border-bottom-right-radius: 0; /* Flat corner on bottom-right */
}

/* Assistant's messages aligned to the left */
.message.assistant {
    background-color: #f1f0f0; /* Light gray for assistant messages */
    color: black;
    float: left; /* Align to the left */
    text-align: left;
    border-bottom-left-radius: 0; /* Flat corner on bottom-left */
}

/* Timestamp (optional) */
.timestamp {
    font-size: 12px;
    color: #aaa;
    text-align: right;
    margin-top: 5px;
    clear: both;
}

/* Form container */
#chatbot-form {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

/* Input field */
#chatbot-input {
    flex-grow: 1;
    /*padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 16px;*/
    box-sizing: border-box;
    /*background-color: #fff; /* White input field */
    outline: none;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    border-color: #0084ff; /* Focused input with blue border */
}

/* Submit button */
#chatbot-form button {
    /*padding: 10px 20px;*/
    margin-left: 10px;
    /*background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;*/
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#chatbot-form button:hover {
    background-color: #005a87;
}

/* Responsive design for smaller screens */
@media screen and (max-width: 600px) {
    #chatbot-container {
        padding: 10px;
    }

    #chatbot-input {
        font-size: 14px;
    }

    #chatbot-form button {
        font-size: 14px;
        padding: 8px 15px;
    }
}

/* Optional: Adjust container size dynamically */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Loading indicator */
.message.loading {
    opacity: 0.7;
}

.typing-indicator {
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Character counter */
#char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

/* Input field improvements */
.chatbot-input {
    resize: none;
    font-family: inherit;
}

.chatbot-input:focus {
    outline: 2px solid #0084ff;
    outline-offset: 2px;
}

/* Disable button when processing */
.chatbot-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Contact Form Styles */
.contact-form-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e3e8f0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-container h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.contact-form-container p {
    color: #555;
    margin: 0 0 15px 0;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

.contact-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
}

.contact-form-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.contact-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.contact-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.contact-btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.contact-btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.contact-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Contact form success/error states */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: #27ae60;
    background-color: #f2fdf2;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.success-message {
    color: #27ae60;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Loading state for contact form */
.contact-form-loading {
    position: relative;
    overflow: hidden;
}

.contact-form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Mobile responsiveness for contact form */
@media screen and (max-width: 600px) {
    .contact-form-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .contact-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .contact-form-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-btn {
        margin-bottom: 10px;
        padding: 14px 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}