/* assets/css/widget.chat.css – Floating AI chat widget for PodcastHub */

#ph-chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 90px;
    /* sits just above the global player */
    z-index: 1100;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

#ph-chat-panel {
    position: fixed;
    right: 20px;
    bottom: 140px;
    width: 320px;
    max-height: 440px;
    background: #ffffff;
    border-radius: 1.2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1100;
}

#ph-chat-panel.is-open {
    display: flex;
}

.ph-chat-header {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ph-chat-header-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.ph-chat-header-sub {
    font-size: 0.7rem;
    color: #6b7280;
}

.ph-chat-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1 1 auto;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.06) 0, transparent 55%),
        radial-gradient(circle at bottom right, rgba(244, 114, 182, 0.06) 0, transparent 55%),
        #f9fafb;
}

.ph-chat-msg {
    margin-bottom: 0.55rem;
    display: flex;
}

.ph-chat-msg.ph-chat-user {
    justify-content: flex-end;
}

.ph-chat-bubble {
    max-width: 80%;
    padding: 0.45rem 0.7rem;
    border-radius: 0.9rem;
    font-size: 0.78rem;
    line-height: 1.3;
}

.ph-chat-user .ph-chat-bubble {
    background: #2563eb;
    color: #ffffff;
    border-bottom-right-radius: 0.2rem;
}

.ph-chat-ai .ph-chat-bubble {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #111827;
    border-bottom-left-radius: 0.2rem;
}

.ph-chat-meta {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}

.ph-chat-footer {
    padding: 0.55rem 0.6rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
}

.ph-chat-input-row {
    display: flex;
    gap: 0.4rem;
}

.ph-chat-input-row input[type="text"] {
    font-size: 0.8rem;
}

.ph-chat-typing {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.35rem;
    min-height: 0.9rem;
}