﻿/* ── Scoped reset: neutralise theme/page-builder overrides ── */
/* :where() keeps specificity at (0,0,0) so widget rules always win */
:where(.hlc-chatbot-container) *,
:where(.hlc-chatbot-container) *::before,
:where(.hlc-chatbot-container) *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

:where(.hlc-chatbot-container) button {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
}

:where(.hlc-chatbot-container) input,
:where(.hlc-chatbot-container) textarea {
    all: unset;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    display: block;
    width: 100%;
}

:where(.hlc-chatbot-container) img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
    outline: none;
    box-shadow: none;
}

:where(.hlc-chatbot-container) a {
    color: inherit;
    text-decoration: none;
}

:where(.hlc-chatbot-container) ul,
:where(.hlc-chatbot-container) ol,
:where(.hlc-chatbot-container) li {
    list-style: none;
    margin: 0;
    padding: 0;
}

:where(.hlc-chatbot-container) p {
    margin: 0;
    padding: 0;
}

/* ─────────────────────────────────────────────────────────── */

.hlc-chatbot-container {
    --hlc-header-bg: #7dbc2a;
    --hlc-header-text: #ffffff;
    --hlc-chat-bg: #f5f5f5;
    --hlc-bot-bg: #ececec;
    --hlc-bot-text: #111827;
    --hlc-user-bg: #2563eb;
    --hlc-user-text: #ffffff;
    --hlc-input-border: #8dc83f;
    --hlc-button-bg: #7dbc2a;
    --hlc-bubble-bg: #7dbc2a;
    --hlc-close-btn: #EF4444;
    --hlc-min-btn: #F59E0B;
    --hlc-widget-padding: 10px;
    --hlc-message-padding: 10px;
    --hlc-bot-label-color: var(--hlc-header-bg);
    --hlc-user-label-color: var(--hlc-header-bg);
    --hlc-font-family: Arial, sans-serif;
    /* !important on structural props so Elementor/theme global rules cannot override */
    position: fixed !important;
    right: var(--hlc-pos-right, 16px) !important;
    bottom: var(--hlc-pos-bottom, 16px) !important;
    left: var(--hlc-pos-left, auto) !important;
    top: var(--hlc-pos-top, auto) !important;
    z-index: 999999 !important;
    font-family: var(--hlc-font-family) !important;
}

.hlc-chat-input-error{
    color:red;
    font-size:11px;
}

.hlc-chatbot-widget {
    position: relative;
    width: 390px;
    border: 1px solid var(--hlc-header-bg);
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hlc-launcher-btn {
    background: var(--hlc-bubble-bg) !important;
    border: 0 !important;
    color: #fff !important;
    height: 52px !important;
    padding: 0 20px 0 16px !important;
    gap: 8px !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22), 0 8px 28px rgba(0,0,0,0.14);
    transition: transform 300ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 300ms ease;
}

.hlc-launcher-btn svg {
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.28));
}

.hlc-launcher-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hlc-launcher-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}

.hlc-launcher-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
    animation: hlcLivePulse 2s ease-out infinite;
}

.hlc-launcher-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}

.hlc-launcher-label:empty {
    display: none;
}

.hlc-launcher-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: hlcPulse 2.4s ease-out infinite;
    background: var(--hlc-bubble-bg);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

@keyframes hlcPulse {
    0%   { transform: scale(1);    opacity: 0.55; }
    70%  { transform: scale(1.7);  opacity: 0; }
    100% { transform: scale(1.7);  opacity: 0; }
}

.hlc-minimized .hlc-chatbot-widget {
    display: none;
}

.hlc-minimized .hlc-launcher-btn {
    display: inline-flex;
}

.hlc-chatbot-container:not(.hlc-minimized) .hlc-launcher-btn {
    display: none !important;
}

.hlc-chat-header {
    background: var(--hlc-header-bg);
    color: var(--hlc-header-text);
    padding: 14px 16px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.hlc-header-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hlc-header-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.hlc-header-bottom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hlc-chat-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.hlc-chat-tagline {
    font-size: 13px;
    opacity: 0.9;
}

.hlc-header-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hlc-avatar-frame {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #ffffff;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    position: relative;
}

.hlc-live-dot {
    display: none;
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
    animation: hlcLivePulse 2s ease-out infinite;
}

.hlc-chatbot-container:not(.hlc-minimized) .hlc-live-dot {
    display: block;
}

@keyframes hlcLivePulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.hlc-avatar-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hlc-agent-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hlc-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.hlc-header-btn {
    border: none !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    height: 30px !important;
    min-width: 36px !important;
    transition: opacity 150ms ease, transform 100ms ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.18);
}

.hlc-header-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.hlc-header-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.14);
}

#hlc-min-btn,
.hlc-min-preview {
    background: var(--hlc-min-btn, #F59E0B) !important;
}

#hlc-close-btn,
.hlc-close-preview {
    background: var(--hlc-close-btn, #EF4444) !important;
}

/* Close-button confirmation popover */
.hlc-close-confirm {
    position: fixed;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.10);
    padding: 14px 16px 12px;
    z-index: 9999999;
    width: 230px;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.hlc-close-confirm::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 10px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.06);
}

.hlc-close-confirm p {
    margin: 0 0 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

.hlc-close-confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.hlc-close-confirm-ok {
    background: #EF4444 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

.hlc-close-confirm-ok:hover { opacity: 0.88; }

.hlc-close-confirm-cancel {
    background: #f1f5f9 !important;
    color: #555 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

.hlc-close-confirm-cancel:hover { background: #e2e8f0 !important; }

.hlc-header-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 18px 12px;
    background: var(--hlc-chat-bg);
    min-height: 20px;
}

.hlc-header-brand:not(:has(img[src])) {
    display: none;
}

#hlc-org-logo,
.hlc-header-brand img {
    max-width: 180px;
    max-height: 50px;
    object-fit: contain;
    background: transparent;
}

.hlc-msg-agent-label {
    color: var(--hlc-bot-label-color, var(--hlc-header-bg));
    font-size: 11px;
    margin-bottom: 4px;
    text-align: left;
}

.hlc-msg-content {
    white-space: pre-wrap;
}

.hlc-connecting-line {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-flex;
    width: fit-content;
}

.hlc-chat-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--hlc-chat-bg);
    position: relative;
}

.hlc-accessibility-toggle {
    border: none !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.18);
    transition: opacity 150ms ease, transform 150ms ease;
}

.hlc-accessibility-toggle:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.hlc-accessibility-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hlc-chat-input-row {
    padding: var(--hlc-widget-padding);
    background: transparent;
}

.hlc-accessibility-panel {
    position: fixed;
    z-index: 9999999;
    display: grid;
    gap: 4px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
    min-width: 176px;
}

.hlc-accessibility-panel[hidden] {
    display: none;
}

.hlc-accessibility-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    color: #374151;
    text-align: left;
    transition: background 120ms ease, color 120ms ease;
}

.hlc-accessibility-option:hover {
    background: #f3f4f6;
}

.hlc-accessibility-option[aria-pressed="true"] {
    background: var(--hlc-header-bg, #7dbc2a) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.hlc-accessibility-option[aria-pressed="true"] .hlc-accessibility-option-icon {
    color: rgba(255,255,255,0.85) !important;
}

.hlc-accessibility-option-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.hlc-accessibility-option-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

/* ── Larger Text ── */
.hlc-accessibility-larger-text .hlc-msg,
.hlc-accessibility-larger-text .hlc-chat-input-row input,
.hlc-accessibility-larger-text .hlc-chat-input-row textarea,
.hlc-accessibility-larger-text .hlc-accessibility-option-label,
.hlc-accessibility-larger-text .hlc-chat-title,
.hlc-accessibility-larger-text .hlc-chat-tagline {
    font-size: 16px !important;
}

/* ── High Contrast ── override CSS variables so all children inherit correct colours */
.hlc-accessibility-high-contrast {
    --hlc-header-bg:    #000000;
    --hlc-header-text:  #ffffff;
    --hlc-chat-bg:      #111111;
    --hlc-bot-bg:       #1a1a1a;
    --hlc-bot-text:     #f3f4f6;
    --hlc-user-bg:      #ffffff;
    --hlc-user-text:    #000000;
    --hlc-input-border: #ffffff;
    --hlc-button-bg:    #ffffff;
    --hlc-bot-label-color:  #9ca3af;
    --hlc-user-label-color: #9ca3af;
}
.hlc-accessibility-high-contrast .hlc-chat-messages {
    background: #111111 !important;
}
.hlc-accessibility-high-contrast .hlc-msg-bot {
    background: #1a1a1a !important;
    color: #f3f4f6 !important;
    box-shadow: none !important;
    border: 1px solid #333 !important;
}
.hlc-accessibility-high-contrast .hlc-msg-user {
    background: #ffffff !important;
    color: #000000 !important;
}
.hlc-accessibility-high-contrast .hlc-chat-footer,
.hlc-accessibility-high-contrast .hlc-chat-input-row {
    background: #111111 !important;
}
.hlc-accessibility-high-contrast .hlc-chat-input-row input,
.hlc-accessibility-high-contrast .hlc-chat-input-row textarea {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #555 !important;
}
.hlc-accessibility-high-contrast .hlc-send-btn {
    background: #ffffff !important;
    color: #000000 !important;
}

/* ── Screen Reader ── add visible agent label prefix when aria-live is active */
.hlc-accessibility-screen-reader .hlc-msg-agent-label::before {
    content: "Agent: ";
}

.hlc-chat-messages {
    height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    background: var(--hlc-chat-bg);
    scrollbar-width: thin;
    scrollbar-color: #8fb6ff #e8eefc;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.hlc-chat-messages::-webkit-scrollbar {
    width: 9px;
}

.hlc-chat-messages::-webkit-scrollbar-track {
    background: #e8eefc;
    border-radius: 999px;
}

.hlc-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7aa6ff 0%, #5b8af8 100%);
    border-radius: 999px;
    border: 2px solid #e8eefc;
}

.hlc-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.hlc-msg-row-bot  { justify-content: flex-start; }
.hlc-msg-row-user { justify-content: flex-end; }

.hlc-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.hlc-msg {
    max-width: 78%;
    margin-bottom: 0;
    padding: var(--hlc-message-padding) calc(var(--hlc-message-padding) + 2px);
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.4;
}

.hlc-msg-bot {
    background: #ffffff;
    border: none;
    color: var(--hlc-bot-text);
    margin-right: auto;
    text-align: left;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hlc-msg-user {
    background: var(--hlc-user-bg);
    color: var(--hlc-user-text);
    margin-left: auto;
    text-align: left;
}

.hlc-msg-bot-meta {
    background: transparent;
    color: #64748b;
    font-size: 12px;
    padding-left: 2px;
}

/* ── Typing dots animation ── */
.hlc-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}
.hlc-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    animation: hlcDotBounce 1.2s ease-in-out infinite;
}
.hlc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.hlc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes hlcDotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

.hlc-msg-user-label,
.hlc-msg-agent-label {
    font-size: 11px;
    margin-bottom: 4px;
    text-align: left;
}
.hlc-msg-agent-label { color: var(--hlc-bot-label-color, var(--hlc-header-bg)); }
.hlc-msg-user-label  { color: var(--hlc-user-label-color, var(--hlc-header-bg)); }

.hlc-chat-input-row {
    padding: var(--hlc-widget-padding);
    background: transparent;
}

.hlc-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hlc-inline-form input {
    color: #111827 !important;
    flex: 1 !important;
    padding: 10px 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    background: #f5f6f7 !important;
    outline: none !important;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.hlc-inline-form input:focus {
    border-color: var(--hlc-input-border) !important;
    box-shadow: 0 0 0 3px rgba(125, 188, 42, 0.12) !important;
    background: #ffffff !important;
}

.hlc-inline-form input::placeholder {
    color: #ababab!important;
    opacity: 1;
}

.hlc-inline-form button,
.hlc-contact-form button {
    border: 0 !important;
    border-radius: 999px !important;
    padding: 10px 20px !important;
    background: var(--hlc-button-bg) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.hlc-contact-form {
    display: grid;
    gap: 8px;
}

.hlc-contact-form input,
.hlc-contact-form textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #b6d98a;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.hlc-contact-form textarea {
    min-height: 70px;
    resize: vertical;
}

.hlc-contact-form input::placeholder,
.hlc-contact-form textarea::placeholder {
    color: #ababab!important;
    opacity: 1;
}
.hlc-inline-form input::placeholder,
.hlc-inline-form textarea::placeholder {
    color: #ababab!important;
    opacity: 1;
}
.hlc-status {
    color: #475569;
    font-size: 13px;
}

.hlc-field-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 6px;
    text-align: left;
}

.hlc-success-popup {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #86efac;
    background: linear-gradient(135deg, #ecfdf3 0%, #d1fae5 100%);
    animation: hlcPopupIn 420ms ease-out both;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
}

.hlc-success-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    animation: hlcIconPop 520ms ease-out both;
}

.hlc-success-icon {
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
}

.hlc-success-content {
    color: #14532d;
}

.hlc-success-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.hlc-success-message {
    font-size: 13px;
    line-height: 1.35;
}

.hlc-success-sparkle {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 14px;
    opacity: 0;
    animation: hlcSparkle 1200ms ease-out 150ms;
}

@keyframes hlcPopupIn {
    0% {
        transform: translateY(10px) scale(0.96);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.hlc-yesno-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
    justify-content: flex-start;
    max-width: 100%;
}

.hlc-yesno-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.12s;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.hlc-yesno-btn:hover {
    opacity: 0.85;
    transform: scale(1.04);
}

.hlc-yesno-yes {
    background: var(--hlc-button-bg, #7dbc2a);
    color: var(--hlc-header-text, #fff);
}

.hlc-yesno-no {
    background: #e5e7eb;
    color: #374151;
}

@keyframes hlcIconPop {
    0% {
        transform: scale(0.35) rotate(-20deg);
    }
    70% {
        transform: scale(1.14) rotate(4deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes hlcSparkle {
    0% {
        transform: translateY(6px) scale(0.3);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translateY(-12px) scale(1.1);
        opacity: 0;
    }
}

/* ============================================================
   GLASS 3D EFFECT
   ============================================================ */

/* Widget — deep layered shadow + top-edge highlight */
.hlc-chatbot-widget {
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.10),
        0 20px 48px rgba(0, 0, 0, 0.14),
        0 40px 80px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    transform: translateZ(0);
    will-change: transform;
}

/* Header — glass shine overlay */
.hlc-chat-header {
    position: relative;
    overflow: visible;
    border-top-left-radius: 19px !important;
    border-top-right-radius: 19px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.hlc-chat-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(0, 0, 0, 0.06) 100%
    );
    pointer-events: none;
    z-index: 1;
    border-top-left-radius: 19px;
    border-top-right-radius: 19px;
}

/* Avatar — glass ring + deep shadow */
.hlc-avatar-frame {
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.20),
        0 0 0 2px rgba(255, 255, 255, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Connecting line — frosted glass pill */
.hlc-connecting-line {
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Bot bubble — clean white card */
.hlc-msg-bot {
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* User bubble — glass with top shine */
.hlc-msg-user {
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    position: relative;
    overflow: hidden;
}

.hlc-msg-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
}

/* Footer */
.hlc-chat-footer {
    background: var(--hlc-chat-bg) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
}

.hlc-powered-by {
    text-align: center;
    font-size: 10px;
    color: #9ca3af;
    padding-bottom: 2px;
}
.hlc-powered-by a {
    color: #9ca3af;
    text-decoration: none;
}
.hlc-powered-by a:hover {
    color: #6b7280;
    text-decoration: underline;
}

/* ── Emoji button & picker ── */
.hlc-inline-form .hlc-emoji-btn {
    flex-shrink: 0 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.04) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    font-size: 18px !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    line-height: 1 !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background 150ms ease, transform 150ms ease !important;
    box-shadow: none !important;
    color: unset !important;
}
.hlc-inline-form .hlc-emoji-btn:hover {
    background: rgba(0,0,0,0.1) !important;
    transform: scale(1.1) !important;
}
.hlc-emoji-picker[hidden] { display: none !important; }
.hlc-emoji-picker {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    z-index: 10;
    max-height: 160px;
    overflow-y: auto;
}
.hlc-chat-input-row { position: relative; }
.hlc-emoji-picker button {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: none !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: background 100ms ease !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.hlc-emoji-picker button:hover {
    background: rgba(0,0,0,0.07) !important;
}


/* ── Rating widget ── */
.hlc-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 8px 0 2px;
}
.hlc-rating-label {
    font-size: 12px;
    color: #64748b;
}
.hlc-rating-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    background: transparent !important;
    font-size: 20px !important;
    cursor: pointer !important;
    transition: background 150ms ease, transform 150ms ease !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.hlc-rating-btn:hover { background: rgba(0,0,0,0.06) !important; transform: scale(1.15) !important; }
.hlc-rating-thanks {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 6px 0;
}

/* Input — frosted glass pill */
.hlc-inline-form input {
     color: #111827 !important;
    background: rgba(245, 246, 247, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.09) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.hlc-inline-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--hlc-input-border) !important;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(125, 188, 42, 0.12);
}

/* Send button — pill */
.hlc-inline-form button {
    border-radius: 999px !important;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12) !important;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

/* ── Proactive bubble ──────────────────────────────────────────────────── */
.hlc-proactive-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 36px 10px 14px;
    font-size: 13px;
    color: #111827;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    white-space: nowrap;
    cursor: pointer;
    animation: hlcBubblePop 0.25s ease;
    z-index: 9999;
}
.hlc-proactive-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px; right: 20px;
    width: 12px; height: 12px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    transform: rotate(45deg);
}
.hlc-proactive-dismiss {
    position: absolute;
    top: 6px; right: 8px;
    background: none; border: none;
    font-size: 16px; color: #9ca3af;
    cursor: pointer; line-height: 1; padding: 0;
}
.hlc-proactive-dismiss:hover { color: #374151; }
@keyframes hlcBubblePop {
    from { opacity: 0; transform: translateY(6px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── WP Search results ─────────────────────────────────────────────────── */
.hlc-search-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 4px 8px;
}
.hlc-search-result-link {
    display: block;
    padding: 8px 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #1e40af;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.4;
    transition: background 150ms;
}
.hlc-search-result-link:hover { background: #dcfce7; }
.hlc-search-result-link strong { display: block; margin-bottom: 2px; color: #111827; }
.hlc-search-result-link span { color: #6b7280; }

.hlc-inline-form button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12) !important;
}

/* Launcher — modern FAB */
.hlc-launcher-btn {
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.22),
        0 8px 28px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -2px 0 rgba(0, 0, 0, 0.14) !important;
    overflow: visible !important;
}

.hlc-launcher-btn:hover {
    transform: scale(1.12) translateY(-3px) !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.26),
        0 16px 44px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -2px 0 rgba(0, 0, 0, 0.14) !important;
}

.hlc-launcher-btn:active {
    transform: scale(0.96) !important;
    transition-duration: 120ms !important;
}

/* ── GDPR Consent ──────────────────────────────────────────────────────── */
.hlc-gdpr-consent-row {
    display: flex;
    padding: 4px 0 8px;
}
.hlc-gdpr-accept-btn {
    background: var(--hlc-button-bg, #7dbc2a);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 150ms, transform 120ms;
}
.hlc-gdpr-accept-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* ── WooCommerce Product Cards ─────────────────────────────────────────── */
.hlc-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 4px 0 6px;
    max-width: 280px;
}
.hlc-product-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.hlc-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 150ms, transform 150ms;
}
.hlc-cart-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.hlc-atc-btn {
    width: 100%;
    padding: 6px 4px;
    background: var(--hlc-button-bg, #7dbc2a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 150ms, background 200ms;
    letter-spacing: 0.01em;
}
.hlc-atc-btn:hover { opacity: 0.88; }
.hlc-atc-btn:disabled { opacity: 0.6; cursor: default; }
.hlc-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.hlc-product-card-img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}
.hlc-product-card-info {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hlc-product-card-name {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hlc-product-card-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--hlc-button-bg, #7dbc2a);
}
.hlc-product-card-desc {
    font-size: 10px;
    color: #6b7280;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── WooCommerce Order Status Card ────────────────────────────────────── */
.hlc-order-status-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 4px 0 6px;
    max-width: 280px;
    font-size: 13px;
}
.hlc-order-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.hlc-order-status-id {
    font-weight: 700;
    color: #111827;
}
.hlc-order-status-badge {
    font-size: 11px;
    font-weight: 600;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    padding: 2px 10px;
}
.hlc-order-status-row {
    font-size: 12px;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.4;
}
.hlc-order-tracking-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hlc-button-bg, #7dbc2a);
    text-decoration: none;
}
.hlc-order-tracking-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .hlc-chatbot-container {
        right: 8px;
        left: 8px;
        bottom: 8px;
    }

    .hlc-chatbot-widget {
        width: 100%;
    }

    .hlc-chat-messages {
        height: clamp(240px, calc(100dvh - 280px), 440px);
    }
}

/* Prevent iOS Safari from zooming the viewport on input focus.
   Safari auto-zooms when font-size < 16px; this targets iOS only. */
@supports (-webkit-touch-callout: none) {
    :where(.hlc-chatbot-container) input,
    :where(.hlc-chatbot-container) textarea,
    .hlc-inline-form input,
    .hlc-contact-form input,
    .hlc-contact-form textarea {
        font-size: 16px !important;
    }
}

/* ── BOOKING / SLOT PICKER ── */
.hlc-booking-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    margin: 6px 0;
    max-width: 280px;
}

.hlc-booking-date-input {
    padding: 8px 12px;
    border: 1px solid var(--hlc-input-border, #8dc83f);
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    background: #fff;
}

.hlc-booking-btn {
    background: var(--hlc-button-bg, #7dbc2a);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hlc-booking-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hlc-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 10px;
    margin: 6px 0;
    max-width: 300px;
}

.hlc-slot-btn {
    background: #fff;
    border: 1.5px solid var(--hlc-input-border, #8dc83f);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--hlc-button-bg, #7dbc2a);
    transition: background 0.15s, color 0.15s;
    min-width: 80px;
    text-align: center;
}

.hlc-slot-btn:hover {
    background: var(--hlc-button-bg, #7dbc2a);
    color: #fff;
    border-color: var(--hlc-button-bg, #7dbc2a);
}

.hlc-slot-tz-label {
    width: 100%;
    font-size: 11px;
    color: #6b7280;
    padding: 2px 0 4px;
}

.hlc-slot-btn-booked {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
    opacity: 0.7;
}
