/* Floating customer chat (public site only) */
#ipool-chat-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9998;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0369a1, #0c4a6e);
    color: #fff;
    box-shadow: 0 8px 28px rgba(3, 105, 161, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
#ipool-chat-launcher:hover { transform: scale(1.06); }
#ipool-chat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 5rem;
    width: min(100vw - 2rem, 380px);
    height: min(70vh, 520px);
    max-height: calc(100vh - 6.5rem);
    z-index: 9999;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
#ipool-chat-panel.ipool-chat-open { display: flex; }
#ipool-chat-head {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    color: #f8fafc;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
#ipool-chat-head strong { font-size: 0.95rem; }
#ipool-chat-head small { opacity: 0.85; font-size: 0.72rem; display: block; }
#ipool-chat-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}
#ipool-chat-trust {
    font-size: 0.68rem;
    padding: 0.4rem 1rem;
    background: #f0f9ff;
    color: #0369a1;
    border-bottom: 1px solid #bae6fd;
}
#ipool-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ipool-chat-bubble {
    max-width: 92%;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}
.ipool-chat-bubble.customer {
    align-self: flex-end;
    background: #0369a1;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ipool-chat-bubble.admin {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}
.ipool-chat-meta { font-size: 0.65rem; opacity: 0.75; margin-top: 0.2rem; }
#ipool-chat-start-form, #ipool-chat-compose {
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
#ipool-chat-compose { display: none; }
#ipool-chat-compose.ipool-show { display: block; }
#ipool-chat-input {
    width: 100%;
    min-height: 4rem;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
}
