/* My Revue AI Widget CSS */
:root {
    --bg: #f8f9fa;
    --text-main: #111111;
    --card-bg: rgba(255,255,255,0.7);
    --font: 'Inter', sans-serif;
    --ai-color: #cc1c1c;
    --header-font: 'Barlow Condensed', sans-serif;
    --body-font: 'DM Sans', sans-serif;
}

#myrevue-widget-container * {
    box-sizing: border-box;
}

/* FAB Button */
#myrevue-widget-container .fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 25% 45%, #4a9198 0%, #0a0a0a 60%),
                radial-gradient(circle at 10% 80%, #dfa095 0%, transparent 60%);
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    z-index: 100000;
    transition: transform 0.2s, box-shadow 0.2s;
}

#myrevue-widget-container .fab::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: inset -4px -4px 12px rgba(0,0,0,0.5), inset 2px 2px 8px rgba(255,255,255,0.1);
}

#myrevue-widget-container .fab:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Floating Avatar Speech Bubble */
#myrevue-widget-container .fab-tooltip {
    position: fixed;
    right: 96px;
    bottom: 37px;
    background: #ffffff;
    padding: 10px 40px 10px 18px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    font-size: 15px;
    font-family: var(--font);
    font-weight: 500;
    color: #111;
    z-index: 99999;
    white-space: nowrap;
    cursor: pointer;
    transform-origin: center right;
    animation: popTooltip 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 1.5s;
    opacity: 0;
    transform: scale(0);
}

#myrevue-widget-container .fab-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -6px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 7px solid #ffffff;
}

#myrevue-widget-container .fab-tooltip-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
#myrevue-widget-container .fab-tooltip-close:hover { color: #111; }

@keyframes popTooltip {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* The Widget Main Canvas */
#myrevue-widget-container .desktop-widget {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 400px;
    height: 600px;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
    z-index: 100000;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#myrevue-widget-container .desktop-widget.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

#myrevue-widget-container .ambient-glow {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(circle at 30% 50%, rgba(255,182,217, 0.45) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(212,179,255, 0.45) 0%, transparent 60%);
    filter: blur(30px);
    z-index: 0;
    pointer-events: none;
    transition: opacity 1s;
}

#myrevue-widget-container .main-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 20px 24px;
    overflow: hidden;
    font-family: var(--font);
}

/* Top Header */
#myrevue-widget-container .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

#myrevue-widget-container .header-title {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111;
}

/* Initial View */
#myrevue-widget-container .initial-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s;
}

#myrevue-widget-container .initial-view.hidden { display: none !important; }

#myrevue-widget-container .ai-sparkles-icon svg { width: 20px; height: 20px; fill: #111; }

#myrevue-widget-container .ask-title {
    font-size: 15px;
    font-weight: 500;
    color: #111;
    margin-bottom: 16px;
}

#myrevue-widget-container .suggestions-panel { width: 100%; }
#myrevue-widget-container .suggestions-label { font-size: 11px; color: #999; margin-bottom: 8px; padding-left: 2px; }

#myrevue-widget-container .suggestions-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
#myrevue-widget-container .suggestions-grid::-webkit-scrollbar { display: none; }

#myrevue-widget-container .suggestion-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,1);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11.5px;
    color: #333;
    width: 140px;
    flex-shrink: 0;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

#myrevue-widget-container .suggestion-card:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

/* Chat View */
#myrevue-widget-container .chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    width: 100%;
    gap: 20px;
    padding-bottom: 20px;
    scrollbar-width: none;
}
#myrevue-widget-container .chat-view::-webkit-scrollbar { display: none; }
#myrevue-widget-container .chat-view.hidden { display: none !important; }

/* Messages */
#myrevue-widget-container .msg-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideUp 0.3s ease forwards;
}

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

#myrevue-widget-container .msg-label {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
}

#myrevue-widget-container .label-user { color: #999; }
#myrevue-widget-container .label-ai { color: var(--ai-color); }
#myrevue-widget-container .label-ai svg { width: 10px; height: 10px; fill: var(--ai-color); }

#myrevue-widget-container .msg-text-user {
    font-size: 13.5px;
    color: #111;
    line-height: 1.5;
    font-weight: 400;
}

#myrevue-widget-container .msg-box-ai {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #222;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(-1px);
}

#myrevue-widget-container .options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

#myrevue-widget-container .opt-btn {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
}
#myrevue-widget-container .opt-btn:hover { border-color: var(--ai-color); }

/* Input Area */
#myrevue-widget-container .input-area {
    width: 100%;
    margin-top: auto;
    position: relative;
}

#myrevue-widget-container .input-wrapper {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 6px 0 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s;
}

#myrevue-widget-container .input-wrapper:focus-within {
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.15);
}

#myrevue-widget-container .input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 12.5px;
    font-family: inherit;
    color: #111;
    background: transparent;
    min-width: 0;
}
#myrevue-widget-container .input-field::placeholder { color: #aaa; }

#myrevue-widget-container .send-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

#myrevue-widget-container .send-btn svg {
    width: 16px;
    height: 16px;
    stroke: #999;
    stroke-width: 2;
    fill: none;
    transition: stroke 0.2s;
}
#myrevue-widget-container .send-btn:hover svg { stroke: #111; }

#myrevue-widget-container .loading-dots { display: flex; align-items: center; gap: 4px; padding: 4px 0; }
#myrevue-widget-container .ldot {
    width: 4px; height: 4px; border-radius: 50%; background: #ccc;
    animation: lbounce 1.4s infinite ease-in-out both;
}
#myrevue-widget-container .ldot:nth-child(1) { animation-delay: -0.32s; }
#myrevue-widget-container .ldot:nth-child(2) { animation-delay: -0.16s; }
@keyframes lbounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); background: var(--ai-color); } }

/* Premium Quote Ticket */
#myrevue-widget-container .quote-ticket {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px dashed rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 24px 20px;
    margin-top: 14px;
    margin-bottom: 14px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.03);
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}
#myrevue-widget-container .quote-ticket::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%;
    background: linear-gradient(135deg, rgba(164,112,255,0.05), transparent 60%);
    opacity: 0; transition: opacity 0.3s;
}
#myrevue-widget-container .quote-ticket:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(164,112,255,0.15);
    border-color: rgba(164,112,255,0.3);
    background: #fff;
}
#myrevue-widget-container .quote-ticket:hover::before { opacity: 1; }

#myrevue-widget-container .qty-price-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: #888; margin-bottom: 12px; }

@keyframes shinePulse {
    0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15)); }
    100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); }
}

#myrevue-widget-container .qty-price {
    font-size: 58px; font-weight: 900; color: #111;
    font-family: var(--header-font), 'Inter', sans-serif;
    letter-spacing: 0px; position: relative;
    background: linear-gradient(135deg, #111 20%, #444 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    transition: transform 0.3s; margin-bottom: 8px; animation: shinePulse 3s infinite ease-in-out;
}
#myrevue-widget-container .quote-ticket:hover .qty-price { transform: scale(1.08); }

/* Ultra-Compact Lead Capture Form */
#myrevue-widget-container .lead-capture-form {
    background: #ffffff; border-radius: 12px; padding: 12px 14px 14px;
    margin-top: 6px; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex; flex-direction: column; gap: 8px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#myrevue-widget-container .lead-capture-form:hover {
    transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(164,112,255,0.1);
}
#myrevue-widget-container .lead-capture-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; color: #111; text-align: center; }
#myrevue-widget-container .l-input-field {
    width: 100%; background: #f4f5f8; border: 1px solid #e1e3e8; border-radius: 6px;
    padding: 9px 10px; font-size: 11.5px; outline: none; color: #111; transition: all 0.2s;
}
#myrevue-widget-container .l-input-field:focus { background: #fff; border-color: var(--ai-color); box-shadow: 0 0 0 2px rgba(164, 112, 255, 0.2); }
#myrevue-widget-container .l-submit-btn {
    width: 100%; background: var(--ai-color); color: #fff; border: none; padding: 10px;
    border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 12.5px; transition: all 0.2s; margin-top: 2px;
}
#myrevue-widget-container .l-submit-btn:hover { opacity: 0.9; transform: scale(0.98); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
#myrevue-widget-container .shake-error { animation: shake 0.4s ease-in-out; border-color: #ef4444 !important; background: #fef2f2 !important; }
