/* Lime Softs Live Chat — visitor widget styles.
 * Lime branding (green), Urdu-friendly system font stack, no external fonts.
 * Scoped under .lime-chat-root so it does not leak into the host page.
 */
.lime-chat-root {
    font-family: "Segoe UI", "Noto Nastaliq Urdu", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    z-index: 9999;
}
.lime-chat-root *, .lime-chat-root *::before, .lime-chat-root *::after { box-sizing: border-box; }

/* Floating bubble, bottom-right */
.lime-chat-bubble {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: #0077b6; /* lime green */
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.lime-chat-bubble:hover { background: #00507e; }
.lime-chat-bubble-open { background: #004060; }
.lime-chat-bubble-icon { font-size: 18px; }
.lime-chat-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* Chat window */
.lime-chat-window {
    position: fixed;
    right: 20px;
    bottom: 84px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
}
.lime-chat-header {
    position: relative;
    padding: 12px 44px 10px 14px;
    background: #0077b6;
    color: #fff;
}
.lime-chat-title { font-size: 16px; font-weight: 700; }
.lime-chat-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 4px;
    border-radius: 50%;
    background: #9ca3af;
    vertical-align: middle;
}
.lime-chat-dot-online { background: #4ade80; }
.lime-chat-status { font-size: 12px; opacity: .95; margin-top: 2px; }
.lime-chat-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

/* Start form */
.lime-chat-form { padding: 16px; overflow-y: auto; }
.lime-chat-intro { margin: 0 0 14px; }
.lime-chat-form label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 13px;
}
.lime-chat-form input[type="text"],
.lime-chat-form input[type="tel"],
.lime-chat-inputrow input[type="text"] {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
}
.lime-chat-form input:focus, .lime-chat-inputrow input:focus {
    outline: 2px solid #0077b6;
    outline-offset: 0;
    border-color: #0077b6;
}
.lime-chat-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: #0077b6;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.lime-chat-btn:hover { background: #00507e; }
.lime-chat-btn:disabled { background: #9ca3af; cursor: default; }
.lime-chat-fallback {
    margin: 12px 0 0;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}
.lime-chat-fallback a { color: #00507e; font-weight: 600; }
.lime-chat-error {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
}

/* Chat body */
.lime-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.lime-chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f9fafb;
}
.lime-chat-msg { margin-bottom: 10px; max-width: 85%; }
.lime-chat-msg-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 2px;
}
.lime-chat-msg-body {
    padding: 8px 11px;
    border-radius: 12px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.lime-chat-msg-visitor { margin-left: auto; }
.lime-chat-msg-visitor .lime-chat-msg-label { text-align: right; }
.lime-chat-msg-visitor .lime-chat-msg-body {
    background: #0077b6;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.lime-chat-msg-ai .lime-chat-msg-body,
.lime-chat-msg-manager .lime-chat-msg-body {
    background: #fff;
    border: 1px solid #d1d5db;
    border-bottom-left-radius: 4px;
}
.lime-chat-msg-system {
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 12px;
    text-align: center;
}
.lime-chat-typing {
    padding: 4px 14px 0;
    font-size: 12px;
    font-style: italic;
    color: #6b7280;
}
.lime-chat-body .lime-chat-fallback { padding: 0 12px; }
.lime-chat-inputrow {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}
.lime-chat-inputrow input[type="text"] { flex: 1; }
.lime-chat-send { width: auto; padding: 10px 16px; }
.lime-chat-body .lime-chat-error { margin: 0 12px 10px; }

@media (max-width: 420px) {
    .lime-chat-window { right: 10px; bottom: 76px; width: calc(100vw - 20px); }
    .lime-chat-bubble { right: 10px; bottom: 10px; }
}

.lime-chat-human {
    display: block; width: calc(100% - 16px); margin: 6px 8px 2px;
    background: #fef3c7; color: #92400e; border: 1px solid #f59e0b;
    border-radius: 9px; padding: 8px 10px; font-size: 13.5px; cursor: pointer;
}
.lime-chat-human:hover { background: #fde68a; }
.lime-chat-human:disabled { background: #e7f6d5; color: #3d6b12; border-color: #0077b6; cursor: default; }

/* 17-AY: chat khuli ho to bubble hide (khirki ka apna close hai) */
body.lc-open .lime-chat-bubble { display: none !important; }

/* 17-AZ FIX: hidden attribute must ALWAYS win — window/form/body band ho sakein */
.lime-chat-root [hidden] { display: none !important; }
/* FLOAT STACK FIX 1Dec: bottom-right cluster saaf vertical stack, koi overlap nahi */
.wa-float { bottom: 84px !important; }
.lime-chat-bubble { bottom: 156px !important; }
.ai-float { bottom: 220px !important; }
.online-float { bottom: 84px !important; }

/* FLOAT LAYOUT FINAL 1Dec: Chat DUSRI (left) taraf, WhatsApp right taraf — koi overlap nahi */
.wa-float { bottom: 84px !important; }
.ai-float { bottom: 156px !important; }
.online-float { bottom: 148px !important; }
.lime-chat-bubble { left: 18px !important; right: auto !important; bottom: 84px !important; background: #0077b6 !important; }
.lime-chat-window { left: 18px !important; right: auto !important; }
/* FLOAT LAYOUT v3 1Dec: sirf EK floating button (chat) — WhatsApp aur AI Madad floats khatam */
.wa-float { display: none !important; }
.ai-float { display: none !important; }