/* Lancet Chat Widget */
.lc-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lc-chat-toggle {
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: transparent;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.lc-chat-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.lc-chat-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.lc-chat-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 80px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 460px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    flex-direction: column;
}

.lc-chat-panel.open {
    display: flex;
}

.lc-chat-header {
    background: linear-gradient(135deg, #002a4d, #004080);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lc-chat-header-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
}

.lc-chat-header-sub {
    font-size: 0.72rem;
    opacity: 0.85;
    margin: 0;
}

.lc-chat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.lc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f4f7fb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-chat-bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.lc-chat-bubble.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid rgba(0, 42, 77, 0.08);
    border-bottom-left-radius: 4px;
}

.lc-chat-bubble.user {
    align-self: flex-end;
    background: #002a4d;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.lc-chat-bubble-time {
    display: block;
    font-size: 0.65rem;
    opacity: 0.65;
    margin-top: 4px;
}

.lc-chat-notify {
    align-self: stretch;
    background: #fff8e6;
    border: 1px dashed #f0ad4e;
    color: #7a5a00;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.lc-chat-notify:hover {
    background: #fff3cd;
}

.lc-chat-notify strong {
    display: block;
    color: #002a4d;
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.lc-chat-input-wrap {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(0, 42, 77, 0.08);
    background: #fff;
}

.lc-chat-input {
    flex: 1;
    border: 1px solid rgba(0, 42, 77, 0.15);
    border-radius: 24px;
    padding: 8px 14px;
    font-size: 0.86rem;
    outline: none;
}

.lc-chat-input:focus {
    border-color: #002a4d;
}

.lc-chat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #002a4d;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.lc-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lc-chat-typing {
    font-size: 0.75rem;
    color: #666;
    padding: 0 4px;
    display: none;
}

.lc-chat-typing.show {
    display: block;
}

@media (max-width: 400px) {
    .lc-chat-widget {
        right: 12px;
        bottom: 12px;
    }

    .lc-chat-panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
    }
}
