/* OnePay Chatbot Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
#op-chatbot-trigger, #op-chatbot-window, #op-chatbot-window * {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}
/* Floating Trigger Button */
#op-chatbot-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
}
#op-chatbot-trigger:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}
#op-chatbot-trigger .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    transition: transform 0.3s ease;
}
#op-chatbot-trigger:hover .dashicons {
    transform: scale(1.1);
}
/* Pulse Notification Ring */
.op-notification-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.6;
    animation: opPulseRing 2s infinite ease-out;
    z-index: -1;
    pointer-events: none;
}
@keyframes opPulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
/* Chatbot Window Container */
#op-chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    height: 580px;
    max-height: calc(100vh - 120px);
    max-width: calc(100vw - 50px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 999998;
    overflow: hidden;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}
#op-chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}
/* Chat Header */
.op-chatbot-header {
    padding: 16px 20px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.op-chatbot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.op-chatbot-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.opc h4{
    color: #ffffff !important; 
}
#op-chatbot-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
}
#op-chatbot-close:hover {
    opacity: 1;
    transform: scale(1.1);
}
/* Chat Message Area */
.op-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(248, 250, 252, 0.4);
    scroll-behavior: smooth;
}
/* Custom Scrollbar for Messages */
.op-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.op-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.op-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.op-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
/* Message Dialogue Bubbles */
.op-chatbot-bubble {
    max-width: 82%;
    display: flex;
    flex-direction: column;
    animation: opBubbleFadeIn 0.3s ease forwards;
    position: relative;
}
@keyframes opBubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.op-chatbot-bubble.bot {
    align-self: flex-start;
}
.op-chatbot-bubble.user {
    align-self: flex-end;
}
.op-bubble-text {
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    border-radius: 16px;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.op-chatbot-bubble.bot .op-bubble-text {
    background: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(226, 232, 240, 0.7);
}
.op-chatbot-bubble.user .op-bubble-text {
    background: #6366f1; /* Dynamic replaced by script color if needed, fallback set */
    color: #ffffff;
    border-bottom-right-radius: 4px;
}
.op-bubble-time {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}
.op-chatbot-bubble.user .op-bubble-time {
    align-self: flex-end;
}
/* Quick Replies Container */
.op-chatbot-quick-replies {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}
.op-quick-reply-btn {
    background: #ffffff;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    color: #475569;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.op-quick-reply-btn:hover {
    border-color: #6366f1; /* Handled dynamic by JS */
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1);
}
/* Footer Input Area */
.op-chatbot-footer {
    padding: 14px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}
#op-chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #f8fafc;
}
#op-chatbot-input:focus {
    border-color: #6366f1;
    background: #ffffff;
}
#op-chatbot-send {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}
#op-chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
/* Typing Indicator Animation */
.op-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}
.op-typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: opBounceDot 1.4s infinite ease-in-out;
}
.op-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.op-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes opBounceDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}
/* Plan Comparison Card inside chat */
.op-chat-plans-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.op-chat-plan-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #f1f5f9;
}
.op-chat-plan-row:last-child {
    border-bottom: none;
}
.op-chat-plan-title {
    font-weight: 600;
    color: #334155;
}
.op-chat-plan-val {
    color: #6366f1;
    font-weight: 700;
}
/* Calculator Result Card */
.op-calc-result-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    border-radius: 16px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}
.op-calc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 12.5px;
}
.op-calc-row:last-child {
    border-bottom: none;
}
.op-calc-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 5px;
    border-top: 2px solid rgba(255,255,255,0.15);
    font-weight: 700;
    font-size: 14px;
}
.op-calc-lbl {
    color: #94a3b8;
}
.op-calc-val {
    color: #38bdf8;
    font-weight: 600;
}
.op-calc-val.maturity {
    color: #4ade80;
    font-size: 16px;
}