/**
 * PrecisionECU AI Assistant Widget Styles
 * Sleek Cyberpunk Automotive Dark Aesthetics, Glassmorphism & SilkySEO AI Engine
 */

:root {
    --pec-ai-primary: #6366f1;
    --pec-ai-primary-glow: rgba(99, 102, 241, 0.45);
    --pec-ai-secondary: #ec4899;
    --pec-ai-accent: #06b6d4;
    --pec-ai-bg: rgba(8, 12, 24, 0.96);
    --pec-ai-border: rgba(99, 102, 241, 0.28);
    --pec-ai-text: #f8fafc;
    --pec-ai-muted: #94a3b8;
    --pec-ai-card: rgba(18, 24, 43, 0.75);
}

/* Floating Launcher Container */
.pec-ai-launcher-wrap {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

@media (max-width: 991px) {
    .pec-ai-launcher-wrap {
        bottom: 85px; /* Clear mobile navigation dock */
        right: 18px;
    }
}

/* Proactive Teaser Speech Bubble */
.pec-ai-teaser {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 18px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(99, 102, 241, 0.2);
    display: none;
    align-items: center;
    gap: 10px;
    max-width: 280px;
    cursor: pointer;
    transform-origin: bottom right;
    animation: pecAiTeaserFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

.pec-ai-teaser:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 22px rgba(99, 102, 241, 0.35);
}

.pec-ai-teaser-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px;
    margin-left: auto;
    transition: color 0.2s;
}

.pec-ai-teaser-close:hover {
    color: #fff;
}

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

/* Floating AI Button */
.pec-ai-trigger-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pec-ai-primary) 0%, #4f46e5 50%, var(--pec-ai-secondary) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 25px var(--pec-ai-primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.55rem;
    cursor: pointer;
    position: relative;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    user-select: none;
}

.pec-ai-trigger-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.65);
}

.pec-ai-trigger-btn:active {
    transform: scale(0.96);
}

/* Pulsing Outer Glow Ring */
.pec-ai-pulse-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--pec-ai-primary);
    opacity: 0.7;
    animation: pecAiPulse 2.4s infinite;
    pointer-events: none;
}

@keyframes pecAiPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.22); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Unread Badge */
.pec-ai-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    border: 2px solid #020617;
}

/* Chat Drawer / Window */
.pec-ai-chat-window {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 415px;
    height: 640px;
    max-height: calc(100vh - 110px);
    background: var(--pec-ai-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--pec-ai-border);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(99, 102, 241, 0.22);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pec-ai-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (max-width: 991px) {
    .pec-ai-chat-window {
        bottom: 155px; /* Above mobile dock & launcher */
        right: 18px;
        width: 380px;
        height: 570px;
    }
}

@media (max-width: 640px) {
    .pec-ai-chat-window {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 88vh !important;
        max-height: 88vh !important;
        border-radius: 24px 24px 0 0 !important;
        border-bottom: none !important;
        transform: translateY(100%) !important;
    }
    .pec-ai-chat-window.active {
        transform: translateY(0) !important;
    }
}

/* Chat Header */
.pec-ai-header {
    background: linear-gradient(180deg, rgba(20, 27, 48, 0.85) 0%, rgba(15, 23, 42, 0.5) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.pec-ai-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pec-ai-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pec-ai-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.pec-ai-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #020617;
    box-shadow: 0 0 8px #10b981;
}

.pec-ai-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pec-ai-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pec-ai-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.pec-ai-badge-header {
    background: linear-gradient(135deg, var(--pec-ai-accent), var(--pec-ai-primary));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pec-ai-subtitle {
    font-size: 0.73rem;
    color: #a5b4fc;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pec-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pec-ai-header-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pec-ai-header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: scale(1.05);
}

/* Store Promo Alert inside Chat Header */
.pec-ai-store-notice {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(236, 72, 153, 0.09) 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.18);
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #e2e8f0;
    flex-shrink: 0;
}

.pec-ai-store-notice span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pec-ai-store-notice a {
    color: #c084fc;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

.pec-ai-store-notice a:hover {
    color: #ec4899;
    text-decoration: underline;
}

/* Chat Messages Container */
.pec-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.pec-ai-messages::-webkit-scrollbar {
    width: 5px;
}

.pec-ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.pec-ai-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

/* Individual Message Styles */
.pec-ai-msg-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: pecAiMsgSlide 0.3s ease forwards;
}

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

.pec-ai-msg-row.user {
    justify-content: flex-end;
}

.pec-ai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--pec-ai-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pec-ai-msg-bubble {
    max-width: 86%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.87rem;
    line-height: 1.5;
    word-break: break-word;
}

/* Assistant Bubble */
.pec-ai-msg-row.assistant .pec-ai-msg-bubble {
    background: var(--pec-ai-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-top-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pec-ai-msg-row.assistant .pec-ai-msg-bubble p {
    margin: 0 0 0.5rem 0;
}

.pec-ai-msg-row.assistant .pec-ai-msg-bubble p:last-child {
    margin-bottom: 0;
}

.pec-ai-msg-row.assistant .pec-ai-msg-bubble ul,
.pec-ai-msg-row.assistant .pec-ai-msg-bubble ol {
    margin: 0.35rem 0 0.5rem 0;
    padding-left: 1.2rem;
}

.pec-ai-msg-row.assistant .pec-ai-msg-bubble li {
    margin-bottom: 0.3rem;
}

.pec-ai-msg-row.assistant .pec-ai-msg-bubble strong {
    color: #ffffff;
    font-weight: 700;
}

/* User Bubble */
.pec-ai-msg-row.user .pec-ai-msg-bubble {
    background: linear-gradient(135deg, var(--pec-ai-primary), #4f46e5);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    font-weight: 500;
}

/* Interactive Action Buttons inside Bot Responses */
.pec-ai-action-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pec-chat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.pec-chat-action-btn.shop-btn {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

.pec-chat-action-btn.shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.55);
}

.pec-chat-action-btn.book-btn {
    background: linear-gradient(135deg, var(--pec-ai-primary), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.pec-chat-action-btn.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.55);
}

.pec-chat-action-btn.prices-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pec-chat-action-btn.prices-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

/* Feedback Rating Bar inside Bot Responses */
.pec-ai-feedback-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.pec-feedback-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pec-rate-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pec-rate-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
}

.pec-rate-btn.rate-up:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
}

.pec-rate-btn.rate-down:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.pec-feedback-done {
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Typing Indicator Animation */
.pec-ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: var(--pec-ai-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    border-top-left-radius: 4px;
    width: fit-content;
}

.pec-ai-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pec-ai-primary);
    animation: pecAiDotBounce 1.4s infinite ease-in-out;
}

.pec-ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.pec-ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pecAiDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.15); opacity: 1; }
}

/* Quick Action Suggestion Chips Section */
.pec-ai-chips-section {
    padding: 8px 14px;
    background: rgba(12, 18, 36, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.pec-ai-chips-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pec-ai-chips-wrap {
    display: flex;
    flex-wrap: wrap; /* WRAP so all buttons are directly visible! */
    gap: 6px;
    padding: 0;
}

.pec-ai-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}

.pec-ai-chip:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Chat Input Bar */
.pec-ai-input-area {
    padding: 10px 14px 12px 14px;
    background: rgba(10, 15, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.pec-ai-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 5px 8px 5px 12px;
    transition: border-color 0.25s ease;
}

.pec-ai-input-row:focus-within {
    border-color: var(--pec-ai-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.pec-ai-textarea {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.45;
    resize: none !important;
    max-height: 90px;
    min-height: 24px;
    height: 24px;
    outline: none !important;
    padding: 2px 2px;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.pec-ai-textarea::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.pec-ai-textarea::-webkit-inner-spin-button,
.pec-ai-textarea::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.pec-ai-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pec-ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pec-ai-primary), #4f46e5);
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.pec-ai-send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 15px var(--pec-ai-primary-glow);
}

.pec-ai-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* SilkySEO AI Engine Footer Note */
.pec-ai-footer-note {
    text-align: center;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 2px;
}

.pec-ai-ver-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.62rem;
    font-family: monospace;
}

.pec-ai-engine-highlight {
    color: #06b6d4;
    font-weight: 700;
}

.pec-ai-engine-highlight i {
    color: #06b6d4;
    font-size: 0.65rem;
    margin-right: 2px;
}

/* =========================================================================
   PURE CSS VECTOR ICONS FOR CHAT MESSAGES (REPLACES UNICODE EMOJIS)
   ========================================================================= */

.pec-ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    margin: 0 4px 0 2px;
    vertical-align: -3px;
    font-size: 0.76rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.pec-ai-icon:hover {
    transform: scale(1.15);
}

.pec-ai-icon i {
    line-height: 1;
}

/* Color & glow variations */
.pec-ai-icon.bolt {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.pec-ai-icon.cart,
.pec-ai-icon.shop {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.15);
    border-color: rgba(192, 132, 252, 0.35);
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.25);
}

.pec-ai-icon.rocket {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.pec-ai-icon.shield {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.pec-ai-icon.stop {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.25);
}

.pec-ai-icon.fire {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.15);
    border-color: rgba(251, 113, 133, 0.35);
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.25);
}

.pec-ai-icon.laptop {
    color: #818cf8;
    background: rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.25);
}

.pec-ai-icon.car {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.25);
}

.pec-ai-icon.file {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.25);
}

.pec-ai-icon.bulb {
    color: #fde047;
    background: rgba(253, 224, 71, 0.15);
    border-color: rgba(253, 224, 71, 0.35);
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.25);
}

.pec-ai-icon.price {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.25);
}

.pec-ai-icon.calendar {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.15);
    border-color: rgba(244, 114, 182, 0.35);
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.25);
}

.pec-ai-icon.location {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.15);
    border-color: rgba(251, 113, 133, 0.35);
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.25);
}

.pec-ai-icon.phone {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.pec-ai-icon.globe {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.pec-ai-icon.wrench {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.15);
    border-color: rgba(251, 146, 60, 0.35);
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.25);
}

.pec-ai-icon.gear {
    color: #cbd5e1;
    background: rgba(203, 213, 225, 0.15);
    border-color: rgba(203, 213, 225, 0.35);
    box-shadow: 0 0 10px rgba(203, 213, 225, 0.25);
}

.pec-ai-icon.oil {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.pec-ai-icon.wave {
    color: #fde047;
    background: rgba(253, 224, 71, 0.15);
    border-color: rgba(253, 224, 71, 0.35);
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.25);
}

.pec-ai-icon.sparkle {
    color: #e879f9;
    background: rgba(232, 121, 249, 0.15);
    border-color: rgba(232, 121, 249, 0.35);
    box-shadow: 0 0 10px rgba(232, 121, 249, 0.25);
}

.pec-ai-icon.chip {
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

.pec-ai-icon.volume {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.pec-ai-icon.traffic {
    color: #eab308;
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.35);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.pec-ai-icon.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* AI Chat Image & Diagram Support */
.pec-chat-img-card {
    margin: 10px 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.28);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    max-width: 100%;
}

.pec-chat-img-card:hover {
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(99, 102, 241, 0.25);
}

.pec-chat-img-wrapper {
    position: relative;
    width: 100%;
    min-height: 120px;
    max-height: 250px;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pec-chat-img-wrapper img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.pec-chat-img-card:hover .pec-chat-img-wrapper img {
    transform: scale(1.02);
}

.pec-chat-img-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.pec-chat-img-card:hover .pec-chat-img-overlay {
    opacity: 1;
    background: rgba(99, 102, 241, 0.9);
    color: #ffffff;
    border-color: transparent;
}

.pec-chat-img-caption {
    padding: 7px 12px;
    background: rgba(10, 15, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pec-chat-img-caption i {
    color: #818cf8;
    font-size: 0.8rem;
}

.pec-chat-img-card.img-error {
    display: none !important;
}

/* Lightbox Modal for Full View */
.pec-ai-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100005;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pec-ai-lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.pec-ai-lightbox-box {
    position: relative;
    max-width: 900px;
    max-height: 85vh;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
    animation: pecLightboxZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pecLightboxZoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pec-ai-lightbox-box img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    background: #020617;
    display: block;
}

.pec-ai-lightbox-bar {
    padding: 14px 20px;
    background: rgba(10, 15, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pec-ai-lightbox-caption {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pec-ai-lightbox-caption i {
    color: #38bdf8;
}

.pec-ai-lightbox-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pec-ai-lightbox-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.08);
}

/* Clean Utilities for AI Assistant */
.text-orange { color: #f97316 !important; }
.text-pink { color: #ec4899 !important; }
.pec-ai-engine-box {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pec-ai-gdpr-btn {
    color: rgba(255,255,255,0.45);
    font-size: 0.65rem;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
}
