/* Live Chat & AI Concierge Styling - ASAR Banquets */
.orion-chat-wrapper {
    --oyc-brand: #d4af37;
    --oyc-brand-dark: #b38f28;
    --oyc-dark: #1a1a1a;
    --oyc-text: #2d3748;
    --oyc-light: #f8fafc;
    --oyc-border: #e2e8f0;
    --oyc-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    z-index: 999999;
}

/* Standing Ribbon */
.orion-chat-ribbon {
    position: fixed;
    bottom: 24px;
    right: 90px;
    background: var(--oyc-dark);
    color: #ffffff;
    border: 1px solid var(--oyc-brand);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    z-index: 999998;
    transition: transform 0.2s ease;
}

.orion-chat-ribbon:hover {
    transform: translateY(-2px);
    background: #2a2a2a;
}

/* Floating Action Button */
.orion-chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--oyc-brand), var(--oyc-brand-dark));
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orion-chat-fab:hover {
    transform: scale(1.08);
}

.orion-chat-fab-icon {
    font-size: 26px;
}

.orion-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Chat Window Box */
.orion-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 580px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--oyc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    border: 1px solid rgba(212, 175, 55, 0.25);
    animation: orionSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes orionSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.orion-chat-header {
    background: linear-gradient(135deg, var(--oyc-dark), #2d2d2d);
    color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--oyc-brand);
}

.orion-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orion-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--oyc-brand);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.orion-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.orion-chat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.orion-chat-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.orion-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.orion-chat-close:hover {
    color: #ffffff;
}

/* Body */
.orion-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--oyc-light);
    display: flex;
    flex-direction: column;
}

/* Lead Capture Form */
.orion-chat-lead-form {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--oyc-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.orion-chat-lead-form h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--oyc-dark);
}

.orion-chat-lead-form p {
    margin: 0 0 16px 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

.orion-chat-lead-form input,
.orion-chat-lead-form select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--oyc-border);
    border-radius: 8px;
    font-size: 0.88rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.orion-chat-lead-form input:focus,
.orion-chat-lead-form select:focus {
    border-color: var(--oyc-brand);
}

.orion-chat-btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--oyc-brand), var(--oyc-brand-dark));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.orion-chat-btn-submit:hover {
    opacity: 0.92;
}

/* Messages Stream */
.orion-chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.orion-msg {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: orionFadeIn 0.2s ease;
}

@keyframes orionFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.orion-msg-visitor {
    align-self: flex-end;
}

.orion-msg-bot,
.orion-msg-agent {
    align-self: flex-start;
}

.orion-msg-system {
    align-self: center;
    background: rgba(226, 232, 240, 0.8);
    color: #475569;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 12px;
    text-align: center;
}

.orion-msg-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 2px;
    padding-left: 4px;
}

.orion-msg-visitor .orion-msg-meta {
    text-align: right;
    padding-right: 4px;
}

.orion-msg-body {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
    white-space: pre-wrap;
}

.orion-msg-body strong {
    font-weight: 700;
    color: inherit;
}

.orion-msg-visitor .orion-msg-body {
    background: var(--oyc-dark);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.orion-msg-bot .orion-msg-body,
.orion-msg-agent .orion-msg-body {
    background: #ffffff;
    color: var(--oyc-text);
    border: 1px solid var(--oyc-border);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.orion-chat-link {
    color: var(--oyc-brand-dark);
    font-weight: 600;
    text-decoration: underline;
}

.orion-msg-img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 6px;
    display: block;
}

.orion-msg-file-link {
    display: inline-block;
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 0;
}

/* Typing Dots */
.orion-typing-dots {
    padding: 8px 16px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #94a3b8;
}

/* Dynamic Chips */
.orion-chat-chips {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.orion-chip-btn {
    background: #ffffff;
    border: 1px solid var(--oyc-brand);
    color: var(--oyc-dark);
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.orion-chip-btn:hover {
    background: var(--oyc-brand);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Rating Form */
.orion-chat-rating {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--oyc-border);
    margin-top: 12px;
    text-align: center;
}

.orion-chat-stars {
    font-size: 24px;
    color: #cbd5e1;
    margin: 8px 0;
    cursor: pointer;
}

.orion-chat-stars span {
    padding: 0 2px;
    transition: color 0.15s;
}

.orion-chat-stars span.active {
    color: #f59e0b;
}

.orion-chat-rating textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--oyc-border);
    border-radius: 6px;
    font-size: 0.82rem;
    box-sizing: border-box;
}

/* Footer / Input Bar */
.orion-chat-footer {
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid var(--oyc-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.orion-chat-file-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.orion-chat-file-btn:hover {
    opacity: 1;
}

.orion-chat-footer input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--oyc-border);
    border-radius: 20px;
    font-size: 0.88rem;
    outline: none;
}

.orion-chat-footer input[type="text"]:focus {
    border-color: var(--oyc-brand);
}

.orion-chat-send-btn {
    background: var(--oyc-brand);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.orion-chat-send-btn:hover {
    background: var(--oyc-brand-dark);
}

/* Mobile responsive rules */
@media (max-width: 600px) {
    .orion-chat-window {
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .orion-chat-ribbon {
        right: 80px;
        bottom: 80px;
    }
    .orion-chat-fab {
        bottom: 75px;
        right: 15px;
    }
}
