﻿/* Chat Header */
#chat-header {
    background: linear-gradient(135deg, #a32a08, #a32a08);
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

#header-message {
    font-size: 16px;
    font-weight: bold;
}

/* Chat Container */
#live-chat-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    z-index: 1001;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#live-chat-container.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#live-chat-container.hidden {
    opacity: 0;
    transform: translateY(20px);
}

/* Chat Body */
#chat-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Form Elements */
form input,
form textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: #00aaff;
}

form textarea {
    resize: none;
    height: 80px;
}

form button {
    background: linear-gradient(135deg, #a32a08, #a32a08);
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

    form button:hover {
        background: linear-gradient(135deg, #a32a08, #a32a08);
        transform: scale(1.05);
    }

/* Chat Bubble */
#chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #a32a08;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Chat Bubble Icon */
.chat-icon {
    background: white;
    color: #0b3b61;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Bubble Text */
.chat-text {
    font-size: 14px;
    font-weight: 500;
}

/* Close Button (Chat Closed State) */
#chat-bubble.chat-close {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    background: #a32a08;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#chat-bubble.chat-close .chat-icon {
    width: auto;
    height: auto;
    background: none;
    color: white;
    font-size: 16px;
}

#chat-bubble.chat-close .chat-text {
    display: none;
}

/* Validation Styles */
.is-invalid {
    border-color: #dc3545; /* Bootstrap error red */
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Error text color */
}

/* Reset placeholder text color */
.is-invalid::placeholder {
    color: #dc3545;
    font-style: italic;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Prevent Layout Shift for Error Messages */
form .mb-3 {
    margin-bottom: 0.00rem;
}

#live-chat-form button[type="submit"] {
    margin-top: 15px; /* Prevent overlap with error messages */
    visibility: visible; /* Force visibility */
    display: block; /* Ensure it remains a block element */
}

/* Responsive Design */
@media (max-width: 768px) {
    #live-chat-container {
        width: 90%;
        right: 5%;
    }

    #chat-bubble {
        bottom: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 12px;
    }

    #chat-bubble.chat-close {
        width: 50px;
        height: 50px;
    }

    #chat-header {
        font-size: 16px;
    }

    #header-message {
        font-size: 14px;
    }

    form input,
    form textarea {
        font-size: 12px;
    }

    form button {
        font-size: 14px;
    }
}
