/* Telegram Live Chat Widget CSS - v1.4 */

:root {
    --tlc-theme-color: #0088cc; /* Default color, will be overridden by PHP */
}

#tlc-container {
    position: fixed;
    z-index: 99998;
}

/* Position Settings */
.tlc-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.tlc-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

#tlc-chat-bubble {
    width: 60px;
    height: 60px;
    background-color: var(--tlc-theme-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out;
}

#tlc-chat-bubble svg {
    width: 32px;
    height: 32px;
}

#tlc-chat-bubble:hover {
    transform: scale(1.1);
}

#tlc-chat-widget {
    position: absolute;
    bottom: 70px; /* Position relative to the container */
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 110px);
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

#tlc-chat-widget.is-open {
    visibility: visible;
    opacity: 1;
}

.tlc-position-bottom-right #tlc-chat-widget {
    right: 0;
}

.tlc-position-bottom-left #tlc-chat-widget {
    left: 0;
}

#tlc-chat-header {
    background-color: var(--tlc-theme-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

#tlc-chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.tlc-message {
    padding: 8px 12px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    line-height: 1.4;
}

.tlc-visitor-message {
    background-color: var(--tlc-theme-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.tlc-support-message {
    background-color: #e9e9eb;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#tlc-chat-form {
    display: flex;
    align-items: center; /* Vertically align items in the form */
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#tlc-chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    resize: none;
}

#tlc-chat-send {
    /* --- FIX: Button Icon Styling --- */
    background-color: var(--tlc-theme-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    flex-shrink: 0;

    /* Use flexbox for perfect centering */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Remove default padding */
    font-size: 20px; /* Adjust icon size if needed */
}
