/* Scroll to top — sits above live chat toggle */
.scroll-top-btn {
    position: fixed;
    right: calc(24px + env(safe-area-inset-right, 0px));
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    z-index: 9997;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(14, 14, 18, 0.92);
    color: var(--lc-accent, #ffc720);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;
    transition:
        opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.35s,
        bottom 0.3s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: rgba(255, 199, 32, 0.15);
    border-color: rgba(255, 199, 32, 0.45);
    color: #ffe566;
}

.scroll-top-btn:active {
    transform: translateY(0) scale(0.96);
}

.scroll-top-btn:focus-visible {
    outline: 2px solid rgba(255, 199, 32, 0.6);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top-btn {
        transition: opacity 0.15s, visibility 0.15s;
        transform: none;
    }

    .scroll-top-btn.is-visible {
        transform: none;
    }
}

/* Site live chat widget */
#lc-widget {
    --lc-accent: #ffc720;
    --lc-accent-light: #ffe566;
    --lc-accent-dark: #e8ad00;
    --lc-accent-soft: rgba(255, 199, 32, 0.16);
    --lc-accent-soft-2: rgba(255, 199, 32, 0.1);
    --lc-accent-border: rgba(255, 199, 32, 0.42);
    --lc-accent-glow: rgba(255, 199, 32, 0.38);
    --lc-bg: #0e0e12;
    --lc-surface: #14141a;
    --lc-border: rgba(255, 255, 255, 0.08);
    --lc-text-muted: rgba(255, 255, 255, 0.45);
    --lc-text-soft: rgba(255, 255, 255, 0.65);
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
    z-index: 9998;
    font-family: Sora, sans-serif;
}

#lc-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(255, 199, 32, 0.35);
    background: linear-gradient(135deg, var(--lc-accent-dark), var(--lc-accent));
    color: #0a0a0a;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(255, 199, 32, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#lc-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 199, 32, 0.45);
}

#lc-toggle .lc-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--lc-accent);
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--lc-bg);
}

#lc-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: min(380px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 120px));
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: lcSlideUp 0.25s ease;
    text-align: start;
}

#lc-panel.open {
    display: flex;
}

@keyframes lcSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.lc-header {
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, rgba(255, 199, 32, 0.12), transparent);
    border-bottom: 1px solid var(--lc-border);
}

.lc-header-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.lc-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lc-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lc-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.lc-header-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.lc-header-icon-btn:hover:not(:disabled) {
    border-color: var(--lc-accent-border);
    background: var(--lc-accent-soft);
    color: var(--lc-accent-light);
}

.lc-header-icon-btn.hidden {
    display: none;
}

.lc-header-icon-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.lc-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
}

.lc-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-intro {
    padding: 8px 4px 12px;
}

.lc-intro label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
    text-align: start;
}

.lc-intro input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 13px;
    text-align: start;
    direction: inherit;
}

/* Custom platform dropdown (replaces native select popup) */
.lc-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.lc-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lc-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lc-select-trigger:hover {
    border-color: rgba(255, 199, 32, 0.35);
    background: rgba(0, 0, 0, 0.35);
}

.lc-select.is-open .lc-select-trigger {
    border-color: var(--lc-accent-border);
    box-shadow: 0 0 0 1px var(--lc-accent-soft);
}

.lc-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.lc-select-chevron {
    flex-shrink: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    transition: transform 0.2s ease;
}

.lc-select.is-open .lc-select-chevron {
    transform: rotate(180deg);
}

.lc-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    inset-inline: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: min(240px, 40vh);
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--lc-accent-border);
    background: #16161e;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 199, 32, 0.35) transparent;
}

.lc-select-menu[hidden] {
    display: none !important;
}

.lc-select-option {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    text-align: start;
    transition: background 0.12s ease, color 0.12s ease;
}

.lc-select-option:hover,
.lc-select-option:focus-visible {
    background: rgba(255, 199, 32, 0.12);
    color: var(--lc-accent-light);
    outline: none;
}

.lc-select-option.is-selected {
    background: rgba(255, 199, 32, 0.18);
    color: var(--lc-accent-light);
    font-weight: 700;
}

.lc-intro button[type="submit"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lc-accent-dark), var(--lc-accent));
    color: #0a0a0a;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.lc-msg {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.lc-msg.user { align-self: flex-end; }
.lc-msg.admin { align-self: flex-start; }

.lc-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.lc-msg.user .lc-bubble {
    background: linear-gradient(135deg, var(--lc-accent-dark), var(--lc-accent));
    color: #0a0a0a;
    border-bottom-right-radius: 4px;
}

.lc-msg.admin .lc-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.lc-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

.lc-msg.user .lc-time { text-align: end; }

.lc-msg-status {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 2px;
}

.lc-msg-status-sent {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.lc-msg-status-read {
    color: var(--lc-accent-light);
    background: var(--lc-accent-soft);
}

.lc-active-bar,
.lc-end-chat-btn,
.lc-end-chat-hint {
    display: none !important;
}

.lc-image-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.25);
}

.lc-image-preview.hidden {
    display: none;
}

.lc-image-preview img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.lc-image-preview-clear {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.lc-image-preview-clear:hover {
    background: var(--lc-accent-soft);
    color: var(--lc-accent-light);
}

.lc-attach-btn {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--lc-border);
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lc-attach-btn:hover {
    border-color: var(--lc-accent-border);
    background: var(--lc-accent-soft);
    color: var(--lc-accent-light);
}

.lc-msg-image-link {
    display: block;
    margin: 2px 0 6px;
    max-width: 220px;
}

.lc-msg-image {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lc-compose {
    border-top: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.2);
}

.lc-reply-preview {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--lc-accent-soft-2);
    border-bottom: 1px solid rgba(255, 199, 32, 0.18);
}

.lc-reply-preview.active {
    display: flex;
}

.lc-reply-preview-icon {
    color: var(--lc-accent);
    font-size: 14px;
    flex-shrink: 0;
}

.lc-reply-preview-inner {
    flex: 1;
    min-width: 0;
}

.lc-reply-preview-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--lc-accent-light);
    line-height: 1.2;
}

.lc-reply-preview-text {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-reply-cancel {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    flex-shrink: 0;
}

.lc-footer {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lc-footer input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lc-footer input:focus {
    outline: none;
    border-color: var(--lc-accent-border);
    box-shadow: 0 0 0 3px var(--lc-accent-soft-2);
}

.lc-footer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    position: relative;
}

.lc-footer-actions button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
}

#lc-send {
    background: linear-gradient(135deg, var(--lc-accent-dark), var(--lc-accent));
    color: #0a0a0a;
    box-shadow: 0 4px 14px var(--lc-accent-glow);
}

#lc-send:hover {
    filter: brightness(1.06);
}

.lc-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
}

.lc-emoji-btn.active,
.lc-emoji-btn:hover {
    border-color: rgba(255, 199, 32, 0.35);
    background: rgba(255, 199, 32, 0.1);
    color: var(--lc-accent-light);
}

.lc-emoji-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: min(292px, 88vw);
    max-height: 320px;
    flex-direction: column;
    background: linear-gradient(165deg, rgba(18, 18, 26, 0.99), rgba(10, 10, 14, 0.99));
    border: 1px solid rgba(255, 199, 32, 0.15);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 199, 32, 0.06) inset;
    z-index: 10;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.lc-emoji-popup.open {
    display: flex;
}

.lc-media-mode-tabs {
    display: flex;
    gap: 3px;
    margin: 10px 10px 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lc-media-mode {
    flex: 1;
    min-width: 0;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lc-media-mode-symbol {
    font-size: 0.95rem;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.lc-media-mode-name {
    line-height: 1;
}

.lc-media-mode.active {
    background: linear-gradient(180deg, rgba(255, 199, 32, 0.22), rgba(255, 199, 32, 0.12));
    color: var(--lc-accent-light);
    box-shadow: 0 1px 10px rgba(255, 199, 32, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lc-media-mode:not(.active):hover {
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.04);
}

.lc-media-panel.hidden {
    display: none;
}

.lc-gif-search-wrap {
    padding: 8px 10px 4px;
}

.lc-gif-search-wrap input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.48rem 0.85rem;
    font-size: 0.74rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.lc-gif-search-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.lc-gif-search-wrap input:focus {
    outline: none;
    border-color: rgba(255, 199, 32, 0.35);
    background: rgba(0, 0, 0, 0.38);
}

.lc-gif-powered,
.lc-gif-empty {
    margin: 0;
    padding: 6px 10px 10px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.28);
    text-align: center;
}

.lc-gif-powered.hidden {
    display: none;
}

.lc-sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px;
    max-height: 210px;
    overflow-y: auto;
}

.lc-gif-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 4px 10px 6px;
    max-height: 184px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.lc-sticker-item,
.lc-gif-item {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    padding: 4px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lc-sticker-item:hover,
.lc-gif-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.lc-sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lc-gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.lc-msg-sticker {
    width: 112px;
    height: 112px;
    object-fit: contain;
    display: block;
}

.lc-msg-gif {
    max-width: min(220px, 100%);
    max-height: 180px;
    border-radius: 12px;
    display: block;
}

.lc-emoji-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lc-emoji-tabs::-webkit-scrollbar {
    display: none;
}

.lc-emoji-cat {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.18s ease, transform 0.12s ease;
}

.lc-emoji-cat-icon {
    font-size: 18px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.lc-emoji-cat:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.06);
}

.lc-emoji-cat.active {
    background: rgba(255, 199, 32, 0.12);
    box-shadow: none;
}

.lc-emoji-cat.active::after {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--lc-accent);
    transform: translateX(-50%);
}

.lc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 8px 10px;
    max-height: 196px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.lc-emoji-grid::-webkit-scrollbar {
    width: 5px;
}

.lc-emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

img.emoji {
    height: 1.35em;
    width: 1.35em;
    margin: 0 .08em 0 .1em;
    vertical-align: -0.2em;
    display: inline-block;
}

.lc-emoji-item {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s ease;
}

.lc-emoji-item img.emoji {
    width: 24px;
    height: 24px;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lc-emoji-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.06);
}

.lc-emoji-item:hover img.emoji {
    transform: scale(1.05);
}

.lc-emoji-item:active {
    transform: scale(0.92);
}

.lc-emoji-cat-icon img.emoji {
    width: 20px;
    height: 20px;
    display: block;
}

.lc-msg-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.lc-msg.user .lc-msg-footer {
    justify-content: flex-end;
}

.lc-reply-btn {
    padding: 8px 10px;
    min-height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--lc-accent-light);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lc-reply-btn:hover {
    background: var(--lc-accent-soft);
}

.lc-msg.user .lc-reply-btn {
    display: none;
}

.lc-msg.reply-target .lc-bubble {
    outline: 2px solid var(--lc-accent-border);
    outline-offset: 2px;
}

.lc-quote {
    border-left: 3px solid var(--lc-accent);
    padding-left: 8px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.lc-msg.user .lc-quote {
    border-left-color: rgba(255, 255, 255, 0.35);
}

.lc-quote-author {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--lc-accent-light);
}

.lc-msg.user .lc-quote-author {
    color: rgba(255, 255, 255, 0.55);
}

.lc-quote-text {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.lc-typing {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 4px;
    min-height: 16px;
}

.lc-ended {
    margin: 1.25rem 1rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    line-height: 1.5;
}

.lc-ended strong {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-bottom: 0.35rem;
}

.lc-hours {
    padding: 0;
    margin: 0;
    border-bottom: none;
    background: transparent;
}

.lc-hours-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.lc-hours-sep {
    color: rgba(255, 255, 255, 0.22);
    font-size: 11px;
    line-height: 1;
}

.lc-hours-inner {
    display: none;
}

.lc-hours-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.lc-hours.online .lc-hours-dot {
    background: var(--lc-accent);
    box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.lc-hours.online .lc-hours-dot::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: lcHoursRadar 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.lc-hours.offline .lc-hours-dot {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

@keyframes lcHoursRadar {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}

.lc-hours-copy {
    display: none;
}

.lc-hours-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.lc-hours.online .lc-hours-label {
    color: #0a0a0a;
    background: linear-gradient(135deg, var(--lc-accent-dark), var(--lc-accent));
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 3px 10px var(--lc-accent-glow);
    width: fit-content;
}

.lc-hours.offline .lc-hours-label {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    box-shadow: none;
    width: fit-content;
}

.lc-hours-sublabel {
    font-size: 11px;
    color: var(--lc-text-muted);
    line-height: 1.35;
}

.lc-hours.online .lc-hours-sublabel {
    color: rgba(255, 230, 80, 0.75);
}

.lc-intro-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.lc-intro-tab {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.lc-intro-tab.active {
    background: rgba(255, 199, 32, 0.15);
    border-color: rgba(255, 199, 32, 0.35);
    color: var(--lc-accent);
}

.lc-past-panel.hidden,
.lc-new-panel.hidden {
    display: none !important;
}

.lc-past-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 10px;
}

.lc-past-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.lc-past-item {
    width: 100%;
    text-align: start;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.lc-past-item:hover {
    background: rgba(255, 199, 32, 0.1);
    border-color: rgba(255, 199, 32, 0.25);
}

.lc-past-item-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.lc-past-item-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-past-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    padding: 1rem 0;
}

.lc-past-footer {
    border-top: 1px solid var(--lc-border);
    background: rgba(0, 0, 0, 0.28);
    padding: 12px 14px 14px;
    flex-shrink: 0;
}

.lc-past-footer.hidden {
    display: none !important;
}

.lc-past-footer-note {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: var(--lc-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lc-past-back-btn {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 199, 32, 0.24);
    background: rgba(255, 199, 32, 0.1);
    color: var(--lc-accent-light);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lc-past-back-btn:hover {
    background: rgba(255, 199, 32, 0.18);
    border-color: rgba(255, 199, 32, 0.38);
    color: #fff;
}

.lc-readonly-bar {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    background: rgba(255, 199, 32, 0.1);
    border-top: 1px solid rgba(255, 199, 32, 0.2);
    color: var(--lc-accent);
    flex-shrink: 0;
}

.lc-readonly-bar.hidden {
    display: none !important;
}

/* RTL: widget on left, panel anchored correctly, Arabic-friendly font */
html[dir="rtl"] #lc-widget {
    right: auto;
    left: 24px;
    font-family: "Noto Sans Arabic", Sora, sans-serif;
}

html[dir="rtl"] #lc-panel {
    right: auto;
    left: 0;
}

html[dir="rtl"] #lc-toggle .lc-badge {
    right: auto;
    left: -2px;
}

html[dir="rtl"] .scroll-top-btn {
    right: auto;
    left: 24px;
}

#lc-panel[dir="rtl"] .lc-msg.user .lc-bubble {
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 4px;
}

#lc-panel[dir="rtl"] .lc-msg.admin .lc-bubble {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
}

#lc-panel[dir="rtl"] .lc-past-hint,
#lc-panel[dir="rtl"] .lc-intro-tab,
#lc-panel[dir="rtl"] .lc-hours-compact {
    text-align: start;
}

@media (max-width: 480px) {
    .scroll-top-btn {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    #lc-widget {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: calc(16px + env(safe-area-inset-right, 0px));
    }
    #lc-panel {
        width: calc(100vw - 32px);
        height: min(70vh, 480px);
    }

    html[dir="rtl"] #lc-widget {
        right: auto;
        left: 16px;
    }

    html[dir="rtl"] .scroll-top-btn {
        right: auto;
        left: 16px;
    }
}
