/* Explain: Styles for the live chat widget and panel interface. */
/* Live chat with the site owner */
.live-chat {
    position: fixed;
    inset-inline-end: 1rem;
    bottom: 5.5rem;
    z-index: 54;
}

.live-chat[hidden] {
    display: none;
}

.live-chat__launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-color);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-lift);
    transition: transform 0.2s ease;
}

.live-chat__launcher:hover {
    transform: translateY(-2px);
}

.live-chat__launcher i {
    font-size: 1.05rem;
}

.live-chat__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--neon-dark);
    box-shadow: 0 0 0 3px rgba(61, 255, 136, 0.35);
}

.live-chat__panel {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    inset-inline-end: 0;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 10rem));
    display: none;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
}

.live-chat__panel.is-open {
    display: flex;
}

.live-chat__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #ffffff;
}

.live-chat__head-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.live-chat__name {
    font-weight: 700;
    font-family: var(--font-heading);
}

.live-chat__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat__status i {
    font-size: 0.5rem;
    color: var(--neon-color);
    flex-shrink: 0;
}

.live-chat__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
}

.live-chat__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.live-chat__body {
    flex: 1;
    min-height: 6rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    background: var(--surface-color);
}

.live-chat__msg {
    display: flex;
}

.live-chat__msg--visitor {
    justify-content: flex-end;
}

.live-chat__msg--owner {
    justify-content: flex-start;
}

.live-chat__bubble {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.live-chat__msg--visitor .live-chat__bubble {
    background: var(--primary-color);
    color: #ffffff;
    border-start-end-radius: 0.25rem;
}

.live-chat__msg--owner .live-chat__bubble {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-start-start-radius: 0.25rem;
}

.live-chat__time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.68rem;
    opacity: 0.75;
}

.live-chat__intro {
    display: grid;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.live-chat__intro[hidden] {
    display: none;
}

.live-chat__input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.live-chat__input-row[hidden] {
    display: none;
}

.live-chat__input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-color);
    outline: none;
}

.live-chat__input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.live-chat__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    border: none;
    background: var(--primary-color);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
}

.live-chat__send:hover {
    background: var(--primary-hover);
}

@media (max-width: 480px) {
    .live-chat__launcher span {
        display: none;
    }
}