/**
 * FindPandit AI Chatbot - Floating Widget Styles
 */

/* ── FAB Button ── */
#fp-chat-fab {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    z-index: 999999 !important;
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}
#fp-chat-fab:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 28px rgba(249, 115, 22, 0.65) !important;
}

/* ── Notification Dot ── */
.fp-fab-dot {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 10px !important;
    height: 10px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    animation: fp-pulse 2s infinite !important;
}

/* ── FAB Icon ── */
.fp-fab-icon {
    font-size: 1.5rem !important;
    color: #fff !important;
    line-height: 1 !important;
}

/* ── Chat Panel ── */
#fp-chat-panel {
    position: fixed !important;
    bottom: 100px !important;
    right: 28px !important;
    z-index: 999998 !important;
    width: 360px !important;
    max-width: calc(100vw - 40px) !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18) !important;
    display: none !important;
    flex-direction: column !important;
    overflow: hidden !important;
    font-family: inherit !important;
}
#fp-chat-panel.fp-visible {
    display: flex !important;
}

/* ── Panel Header ── */
.fp-panel-header {
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #fff !important;
}
.fp-hdr-avatar {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
}
.fp-hdr-info {
    flex: 1 !important;
    min-width: 0 !important;
}
.fp-hdr-info strong {
    display: block !important;
    font-size: 0.95rem !important;
    color: #fff !important;
}
.fp-hdr-info span {
    font-size: 0.75rem !important;
    opacity: 0.85 !important;
    color: #fff !important;
}
.fp-close-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #fff !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}
.fp-close-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* ── Messages Area ── */
.fp-messages {
    padding: 14px !important;
    height: 280px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #fafafa !important;
}
.fp-row {
    display: flex !important;
}
.fp-bot {
    justify-content: flex-start !important;
}
.fp-usr {
    justify-content: flex-end !important;
}

/* ── Bubbles ── */
.fp-bubble {
    max-width: 82% !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
}
.fp-bot-b {
    background: #f1f3f5 !important;
    color: #212529 !important;
    border-bottom-left-radius: 3px !important;
}
.fp-usr-b {
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    color: #fff !important;
    border-bottom-right-radius: 3px !important;
}
.fp-err-b {
    background: #fff3f3 !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
    border-bottom-left-radius: 3px !important;
}

/* ── Typing Indicator ── */
.fp-typing-row {
    padding: 0 14px 6px !important;
    display: none !important;
}
.fp-typing-row.fp-show {
    display: block !important;
}
.fp-typing-bub {
    background: #f1f3f5 !important;
    display: inline-flex !important;
    gap: 4px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    border-bottom-left-radius: 3px !important;
}
.fp-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #adb5bd !important;
    display: inline-block !important;
    animation: fp-bounce 1.2s infinite ease-in-out !important;
}
.fp-dot:nth-child(1) { animation-delay: 0s !important; }
.fp-dot:nth-child(2) { animation-delay: 0.2s !important; }
.fp-dot:nth-child(3) { animation-delay: 0.4s !important; }

/* ── Input Row ── */
.fp-input-row {
    padding: 10px !important;
    border-top: 1px solid #e9ecef !important;
    display: flex !important;
    gap: 8px !important;
    align-items: flex-end !important;
    background: #fff !important;
}
#fp-input {
    flex: 1 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 20px !important;
    padding: 9px 14px !important;
    font-size: 0.875rem !important;
    resize: none !important;
    outline: none !important;
    max-height: 80px !important;
    overflow-y: auto !important;
    background: #fff !important;
    color: #212529 !important;
}
#fp-input:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
}

/* ── Send Button ── */
#fp-send-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    border: none !important;
    cursor: pointer !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    transition: transform 0.15s !important;
}
#fp-send-btn:hover { transform: scale(1.08) !important; }
#fp-send-btn:disabled { opacity: 0.5 !important; cursor: not-allowed !important; transform: none !important; }

/* ── Scrollbar ── */
.fp-messages::-webkit-scrollbar { width: 4px !important; }
.fp-messages::-webkit-scrollbar-thumb { background: #dee2e6 !important; border-radius: 10px !important; }

/* ── Result Cards (list items rendered as pills) ── */
.fp-result-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px !important;
}
.fp-result-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #fff !important;
    border: 1.5px solid rgba(249, 115, 22, 0.3) !important;
    border-radius: 20px !important;
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    color: #374151 !important;
    font-weight: 500 !important;
}
.fp-result-item i {
    color: #f97316 !important;
    font-size: 0.72rem !important;
}

/* ── Result count label ── */
.fp-result-label {
    font-size: 0.72rem !important;
    color: #6b7280 !important;
    margin-bottom: 2px !important;
    display: block !important;
}

/* ── Text lines inside bot bubble ── */
.fp-text-line {
    margin: 0 0 4px !important;
    padding: 0 !important;
}

/* ── Suggestion Chips (clickable quick-reply) ── */
.fp-suggestions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 4px 14px 10px !important;
}
.fp-chip {
    background: #fff !important;
    border: 1.5px solid rgba(249, 115, 22, 0.5) !important;
    color: #f97316 !important;
    border-radius: 20px !important;
    padding: 5px 12px !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
}
.fp-chip:hover {
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* ── Follow-up label above chips ── */
.fp-followup-label {
    font-size: 0.7rem !important;
    color: #9ca3af !important;
    padding: 0 14px 3px !important;
    display: block !important;
}

/* ── Quota / Redirect button ── */
.fp-redirect-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 8px !important;
}
.fp-redirect-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    color: #fff !important;
    border-radius: 22px !important;
    padding: 8px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: opacity 0.15s !important;
}
.fp-redirect-btn:hover {
    opacity: 0.88 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Pandit Profile Cards ── */
.fp-pandit-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin-top: 8px !important;
}
.fp-pandit-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fff !important;
    border: 1.5px solid rgba(249, 115, 22, 0.25) !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
    transition: border-color 0.15s !important;
}
.fp-pandit-card:hover {
    border-color: rgba(249, 115, 22, 0.6) !important;
}
.fp-pandit-pic {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(249, 115, 22, 0.45) !important;
    flex-shrink: 0 !important;
    background: #f3f4f6 !important;
}
.fp-pandit-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
}
.fp-pandit-name {
    font-size: 0.83rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}
.fp-pandit-meta {
    font-size: 0.71rem !important;
    color: #6b7280 !important;
    margin-top: 2px !important;
    display: block !important;
}
.fp-pandit-name-link {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}
.fp-pandit-name-link:hover {
    color: #f97316 !important;
    text-decoration: underline !important;
}
.fp-verified-icon {
    font-size: 0.8rem !important;
    color: #198754 !important;
    vertical-align: middle !important;
    margin-left: 3px !important;
}
.fp-book-btn {
    display: inline-block !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: opacity 0.15s !important;
}
.fp-book-btn:hover {
    opacity: 0.85 !important;
    color: #fff !important;
}
.fp-pandit-more {
    font-size: 0.71rem !important;
    color: #9ca3af !important;
    text-align: center !important;
    padding: 2px 0 !important;
    margin: 0 !important;
}

/* ── Pooja service cards ── */
.fp-service-section-label {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #d97706 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 6px 2px 2px !important;
    margin-top: 6px !important;
}
.fp-service-section-label i {
    margin-right: 4px !important;
}
.fp-service-icon {
    font-size: 0.78rem !important;
    color: #d97706 !important;
    margin-left: 3px !important;
}
.fp-service-btn {
    background: #d97706 !important;
}
.fp-service-btn:hover {
    background: #b45309 !important;
}

/* ── Map bubble — wider than standard bot bubble ── */
.fp-map-b {
    max-width: 97% !important;
    padding: 10px 10px !important;
}

/* ── Inline Leaflet map container ── */
.fp-map-container {
    width: 100% !important;
    height: 200px !important;
    border-radius: 10px !important;
    margin-top: 8px !important;
    border: 1.5px solid rgba(249, 115, 22, 0.25) !important;
    overflow: hidden !important;
}
/* Override Leaflet's default tile attribution font-size for the small panel */
.fp-map-container .leaflet-control-attribution {
    font-size: 8px !important;
}

/* ── Blog cards ── */
.fp-blog-section-label {
    color: #2563eb !important;
}
.fp-blog-icon {
    font-size: 0.78rem !important;
    color: #2563eb !important;
    margin-left: 3px !important;
}
.fp-blog-excerpt {
    display: block !important;
    font-size: 0.72rem !important;
    color: #6b7280 !important;
    margin-top: 2px !important;
    line-height: 1.3 !important;
}
.fp-blog-btn {
    background: #2563eb !important;
}
.fp-blog-btn:hover {
    background: #1d4ed8 !important;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    #fp-chat-panel { width: calc(100vw - 20px) !important; right: 10px !important; bottom: 86px !important; }
    #fp-chat-fab   { right: 14px !important; bottom: 18px !important; }
}

/* ── Animations ── */
@keyframes fp-bounce {
    0%, 60%, 100% { transform: translateY(0);   background: #adb5bd; }
    30%            { transform: translateY(-5px); background: #f97316; }
}
@keyframes fp-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
@keyframes fp-spin { to { transform: rotate(360deg); } }
