/* =====================================
   Chat UI
===================================== */

body.chat-page {
    background-color: var(--eb-chat-page-bg);
    font-family: 'Figtree', sans-serif;
}

.chat-bubble {
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    max-width: 75%;
    font-size: 0.9rem;
}

.chat-bubble.buyer {
    background: var(--eb-chat-bubble-buyer-bg);
    color: var(--eb-chat-bubble-buyer-text);
    border: 1px solid var(--eb-chat-bubble-buyer-border);
}

.chat-bubble.seller {
    background: var(--eb-chat-bubble-seller-bg);
    border: 1px solid var(--eb-chat-bubble-seller-border);
}

.chat-container {
    height: 320px;
    overflow-y: auto;
    background: var(--eb-chat-container-bg);
    padding: 0.75rem;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--eb-gray-500);
}

.chat-meta span:first-child {
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 600;
    color: var(--eb-gray-700);
}

.chat-header {
    background: var(--eb-chat-header-bg);
    color: var(--eb-chat-header-text);
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
}

.chat-footer {
    background: var(--eb-chat-footer-bg);
    padding: 0.5rem;
    border-top: 1px solid var(--eb-chat-footer-border);
}

.chat-footer textarea {
    resize: none;
    border-radius: 0.5rem;
}

.chat-modal .modal-dialog {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    left: auto;
    top: auto;
    margin: 0;
    max-width: 420px;
    transform: none !important;
    transition: all .3s ease-in-out;
}

.chat-modal .modal-content {
    overflow: hidden;
    border-radius: 1rem;
}

.chat-modal textarea {
    resize: none;
}

/* Keep page accessible while chat is open */
.chat-modal {
    pointer-events: none;
}

.chat-modal .modal-dialog {
    pointer-events: auto;
}

.chat-modal + .modal-backdrop {
    display: none;
}

.chat-modal.modal {
    background: transparent;
}
