/* Explain: Styles for the chat widget and admin chat interface. */
.chat-shell {
    display: flex;
    min-height: 26rem;
    flex-direction: column;
    overflow: hidden;
    border-radius: 2rem;
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    padding: 0.9rem 1.1rem;
}

.chat-online {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sage-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.chat-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #2E9E5B;
    animation: chat-pulse 2s infinite;
}

@keyframes chat-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.55); }
    70% { box-shadow: 0 0 0 0.55rem rgba(46, 158, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); }
}

.chat-name {
    height: 2.5rem;
    width: 11rem;
    max-width: 55%;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--field-bg);
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.82rem;
}

.chat-name:focus {
    border-color: var(--accent-color);
    outline: none;
}

.chat-log {
    display: flex;
    min-height: 16rem;
    max-height: 24rem;
    flex: 1;
    flex-direction: column;
    gap: 0.6rem;
    overflow-y: auto;
    background: var(--background-color);
    padding: 1.1rem;
}

.chat-empty {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chat-row {
    display: flex;
}

.chat-row-me {
    justify-content: flex-end;
}

.chat-row-owner {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 82%;
    border-radius: 1.1rem;
    padding: 0.55rem 0.85rem;
}

.chat-bubble-me {
    border-bottom-right-radius: 0.3rem;
    background: var(--primary-color);
    color: #ffffff;
}

.chat-bubble-owner {
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 0.3rem;
    background: #ffffff;
    color: var(--text-color);
}

.chat-who {
    margin: 0 0 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.75;
}

.chat-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
}

.chat-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--glass-border);
    background: #ffffff;
    padding: 0.7rem;
}

.chat-input {
    height: 2.75rem;
    flex: 1;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--field-bg);
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.88rem;
}

.chat-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.chat-input:disabled {
    opacity: 0.55;
}

.chat-send {
    display: inline-flex;
    height: 2.75rem;
    width: 2.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    transition: background 250ms ease;
}

.chat-send:hover {
    background: var(--accent-color);
}

.chat-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}