/**
 * AI Chat Assistant - Frontend Styles
 * A beautiful, professional chat widget
 */

/* CSS Variables */
:root {
    --aca-primary: #6366f1;
    --aca-primary-dark: #4f46e5;
    --aca-primary-light: #818cf8;
    --aca-primary-alpha: rgba(99, 102, 241, 0.1);
    --aca-bg-primary: #ffffff;
    --aca-bg-secondary: #f8fafc;
    --aca-bg-tertiary: #f1f5f9;
    --aca-text-primary: #1e293b;
    --aca-text-secondary: #64748b;
    --aca-text-tertiary: #94a3b8;
    --aca-border: #e2e8f0;
    --aca-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --aca-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --aca-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --aca-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --aca-radius-sm: 8px;
    --aca-radius: 12px;
    --aca-radius-lg: 16px;
    --aca-radius-xl: 24px;
    --aca-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --aca-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset and Base */
.aca-chat-widget,
.aca-chat-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--aca-font-family);
}

/* Main Widget Container */
.aca-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle Button */
.aca-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aca-primary) 0%, var(--aca-primary-dark) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        var(--aca-shadow-lg),
        0 0 0 0 rgba(99, 102, 241, 0.4);
    transition: var(--aca-transition);
    position: relative;
    overflow: hidden;
}

.aca-chat-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: 50%;
}

.aca-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 
        var(--aca-shadow-xl),
        0 0 0 8px rgba(99, 102, 241, 0.15);
}

.aca-chat-toggle:active {
    transform: scale(0.95);
}

.aca-chat-toggle svg {
    width: 26px;
    height: 26px;
    color: white;
    transition: var(--aca-transition);
}

.aca-chat-toggle .aca-icon-chat {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.aca-chat-toggle .aca-icon-close {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.aca-open .aca-chat-toggle .aca-icon-chat {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.aca-open .aca-chat-toggle .aca-icon-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Notification Badge */
.aca-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: aca-pulse 2s infinite;
}

@keyframes aca-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Chat Window */
.aca-chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: var(--aca-bg-primary);
    border-radius: var(--aca-radius-lg);
    box-shadow: var(--aca-shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--aca-border);
}

.aca-open .aca-chat-window {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.aca-chat-header {
    background: linear-gradient(135deg, var(--aca-primary) 0%, var(--aca-primary-dark) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.aca-chat-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.aca-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.aca-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.aca-avatar svg {
    width: 28px;
    height: 28px;
    color: white;
}

.aca-header-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.aca-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.aca-status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: aca-glow 2s infinite;
}

@keyframes aca-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.aca-minimize-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--aca-transition);
    position: relative;
}

.aca-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.aca-minimize-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Messages Container */
.aca-messages {
    flex: 1;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    padding: 20px;
    padding-bottom: 30px;
    display: block;
    background: var(--aca-bg-secondary);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    min-height: 0 !important;
    position: relative;
}

.aca-messages > * {
    margin-bottom: 16px;
}

.aca-messages > *:last-child {
    margin-bottom: 20px;
}

.aca-messages::-webkit-scrollbar {
    width: 6px;
}

.aca-messages::-webkit-scrollbar-track {
    background: transparent;
}

.aca-messages::-webkit-scrollbar-thumb {
    background: var(--aca-border);
    border-radius: 3px;
}

.aca-messages::-webkit-scrollbar-thumb:hover {
    background: var(--aca-text-tertiary);
}

/* Message Styles */
.aca-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    min-width: 0; /* Prevents flex items from overflowing */
    animation: aca-message-in 0.3s ease-out;
}

@keyframes aca-message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aca-message.aca-user {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.aca-message.aca-bot {
    align-self: flex-start;
    max-width: 90%;
}

.aca-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--aca-primary-alpha);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aca-message-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--aca-primary);
}

.aca-message-bubble {
    padding: 12px 16px;
    border-radius: var(--aca-radius);
    position: relative;
    min-width: 0; /* Prevents flex overflow */
    max-width: 100%;
    overflow: hidden;
}

.aca-message.aca-user .aca-message-bubble {
    background: linear-gradient(135deg, var(--aca-primary) 0%, var(--aca-primary-dark) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.aca-message.aca-bot .aca-message-bubble {
    background: var(--aca-bg-primary);
    color: var(--aca-text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--aca-shadow-sm);
    border: 1px solid var(--aca-border);
}

.aca-message-content {
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    overflow: hidden;
}

.aca-message-content a {
    color: inherit;
    text-decoration: underline;
    word-break: break-all; /* Break long URLs */
}

.aca-message.aca-user .aca-message-content a {
    color: rgba(255, 255, 255, 0.9);
}

.aca-message.aca-bot .aca-message-content a {
    color: var(--aca-primary);
}

.aca-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.aca-message-content li {
    margin-bottom: 4px;
}

.aca-message-content strong {
    font-weight: 600;
}

.aca-message-content p {
    margin: 0 0 8px 0;
}

.aca-message-content p:last-child {
    margin-bottom: 0;
}

.aca-message-time {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.6;
}

.aca-message.aca-user .aca-message-time {
    text-align: right;
}

/* Error Message */
.aca-message.aca-error .aca-message-bubble {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Product Cards */
.aca-product-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    animation: aca-message-in 0.3s ease-out;
}

.aca-product-card {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
    background: var(--aca-bg-primary);
    border-radius: var(--aca-radius);
    overflow: hidden;
    box-shadow: var(--aca-shadow);
    border: 1px solid var(--aca-border);
    transition: var(--aca-transition);
}

.aca-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--aca-shadow-lg);
}

/* Single card takes full width */
.aca-product-cards:has(.aca-product-card:only-child) .aca-product-card {
    flex: 0 0 100%;
    max-width: 280px;
}

.aca-product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--aca-bg-tertiary);
}

.aca-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aca-product-card:hover .aca-product-image img {
    transform: scale(1.05);
}

.aca-product-info {
    padding: 12px;
}

.aca-product-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--aca-text-primary);
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aca-product-name:hover {
    color: var(--aca-primary);
}

.aca-product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}

.aca-product-rating .star {
    color: #d1d5db;
    font-size: 12px;
    line-height: 1;
}

.aca-product-rating .star.filled {
    color: #fbbf24;
}

.aca-product-rating .star.half {
    background: linear-gradient(90deg, #fbbf24 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aca-product-rating .count {
    font-size: 10px;
    color: var(--aca-text-tertiary);
    margin-left: 4px;
}

.aca-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--aca-primary);
    margin-bottom: 6px;
}

.aca-product-price del {
    color: var(--aca-text-tertiary);
    font-weight: 400;
    font-size: 12px;
    margin-right: 4px;
}

.aca-product-price ins {
    text-decoration: none;
    color: #16a34a;
}

.aca-product-stock {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.aca-product-stock.in-stock {
    background: #dcfce7;
    color: #16a34a;
}

.aca-product-stock.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

.aca-product-actions {
    display: flex;
    gap: 8px;
}

.aca-btn-view,
.aca-btn-cart {
    flex: 1;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--aca-transition);
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.aca-btn-view {
    background: var(--aca-bg-tertiary);
    color: var(--aca-text-secondary);
}

.aca-btn-view:hover {
    background: var(--aca-border);
    color: var(--aca-text-primary);
}

.aca-btn-cart {
    background: var(--aca-primary);
    color: white;
}

.aca-btn-cart:hover:not(:disabled) {
    background: var(--aca-primary-dark);
}

.aca-btn-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.aca-btn-cart.aca-added {
    background: #16a34a;
}

/* Mobile: Stack cards vertically */
@media (max-width: 400px) {
    .aca-product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .aca-product-card {
        display: flex;
        flex-direction: row;
    }
    
    .aca-product-image {
        width: 100px;
        min-width: 100px;
        aspect-ratio: 1;
    }
    
    .aca-product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Typing Indicator */
.aca-typing-indicator .aca-message-bubble {
    padding: 14px 20px;
}

.aca-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.aca-typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--aca-text-tertiary);
    border-radius: 50%;
    animation: aca-typing 1.4s infinite ease-in-out both;
}

.aca-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.aca-typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.aca-typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes aca-typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Actions */
.aca-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: var(--aca-bg-secondary);
    border-top: 1px solid var(--aca-border);
    overflow: hidden;
    flex-shrink: 0;
}

.aca-quick-actions.aca-hidden {
    display: none;
}

.aca-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--aca-bg-primary);
    border: 1px solid var(--aca-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--aca-text-secondary);
    cursor: pointer;
    transition: var(--aca-transition);
    white-space: nowrap;
}

.aca-quick-btn:hover {
    background: var(--aca-primary-alpha);
    border-color: var(--aca-primary-light);
    color: var(--aca-primary);
}

.aca-quick-btn svg {
    width: 14px;
    height: 14px;
}

/* Input Area */
.aca-input-area {
    padding: 16px 20px;
    background: var(--aca-bg-primary);
    border-top: 1px solid var(--aca-border);
    flex-shrink: 0;
}

.aca-chat-form {
    display: flex;
}

.aca-input-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: var(--aca-bg-secondary);
    border: 1px solid var(--aca-border);
    border-radius: var(--aca-radius);
    padding: 4px;
    transition: var(--aca-transition);
}

.aca-input-wrapper:focus-within {
    border-color: var(--aca-primary);
    box-shadow: 0 0 0 3px var(--aca-primary-alpha);
}

.aca-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--aca-text-primary);
    resize: none;
    max-height: 120px;
    line-height: 1.5;
}

.aca-input:focus {
    outline: none;
}

.aca-input::placeholder {
    color: var(--aca-text-tertiary);
}

.aca-send-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--aca-radius-sm);
    background: var(--aca-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--aca-transition);
    flex-shrink: 0;
}

.aca-send-btn:hover:not(:disabled) {
    background: var(--aca-primary-dark);
    transform: scale(1.05);
}

.aca-send-btn:disabled {
    background: var(--aca-border);
    cursor: not-allowed;
}

.aca-send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.aca-powered-by {
    text-align: center;
    font-size: 10px;
    color: var(--aca-text-tertiary);
    margin-top: 10px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .aca-chat-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .aca-chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 0;
        border-radius: var(--aca-radius);
    }
    
    .aca-chat-toggle {
        width: 54px;
        height: 54px;
    }
    
    .aca-chat-toggle svg {
        width: 22px;
        height: 22px;
    }
}

/* Dark Mode Support (follows system preference) */
@media (prefers-color-scheme: dark) {
    :root {
        --aca-bg-primary: #1e293b;
        --aca-bg-secondary: #0f172a;
        --aca-bg-tertiary: #334155;
        --aca-text-primary: #f1f5f9;
        --aca-text-secondary: #94a3b8;
        --aca-text-tertiary: #64748b;
        --aca-border: #334155;
    }
    
    .aca-message.aca-bot .aca-message-bubble {
        background: var(--aca-bg-tertiary);
        border-color: var(--aca-border);
    }
    
    .aca-message.aca-error .aca-message-bubble {
        background: #450a0a;
        border-color: #7f1d1d;
        color: #fca5a5;
    }
}

/* Close Panel */
.aca-close-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--aca-bg-primary);
    border-top: 1px solid var(--aca-border);
    border-radius: 0 0 var(--aca-radius-lg) var(--aca-radius-lg);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.aca-close-panel.aca-panel-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.aca-close-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--aca-border);
    background: var(--aca-bg-secondary);
}

.aca-close-panel-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--aca-text-primary);
}

.aca-cancel-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--aca-bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--aca-transition);
}

.aca-cancel-close:hover {
    background: var(--aca-border);
}

.aca-cancel-close svg {
    width: 14px;
    height: 14px;
    color: var(--aca-text-secondary);
}

/* Close Options */
.aca-close-options {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aca-close-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--aca-bg-secondary);
    border: 1px solid var(--aca-border);
    border-radius: var(--aca-radius-sm);
    cursor: pointer;
    transition: var(--aca-transition);
    text-align: left;
    width: 100%;
}

.aca-close-option:hover {
    background: var(--aca-primary-alpha);
    border-color: var(--aca-primary-light);
}

.aca-close-option svg {
    width: 20px;
    height: 20px;
    color: var(--aca-primary);
    flex-shrink: 0;
}

.aca-close-option.aca-option-secondary svg {
    color: var(--aca-text-tertiary);
}

.aca-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aca-option-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--aca-text-primary);
}

.aca-option-text span {
    font-size: 11px;
    color: var(--aca-text-secondary);
}

/* Email Form Panel */
.aca-email-form-panel {
    display: none;
    padding: 16px;
}

.aca-email-form-panel.aca-show {
    display: block;
}

.aca-email-input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.aca-email-input-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--aca-text-tertiary);
    pointer-events: none;
}

.aca-email-field {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: 2px solid var(--aca-border);
    border-radius: var(--aca-radius-sm);
    font-size: 14px;
    color: var(--aca-text-primary);
    background: var(--aca-bg-primary);
    transition: var(--aca-transition);
}

.aca-email-field:focus {
    outline: none;
    border-color: var(--aca-primary);
    box-shadow: 0 0 0 3px var(--aca-primary-alpha);
}

.aca-email-field.aca-error {
    border-color: #ef4444;
    animation: aca-shake 0.5s ease;
}

@keyframes aca-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.aca-email-field::placeholder {
    color: var(--aca-text-tertiary);
}

.aca-email-actions {
    display: flex;
    gap: 10px;
}

.aca-btn-back,
.aca-btn-send-email {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--aca-radius-sm);
    cursor: pointer;
    transition: var(--aca-transition);
    border: none;
    font-family: inherit;
}

.aca-btn-back {
    background: var(--aca-bg-tertiary);
    color: var(--aca-text-secondary);
}

.aca-btn-back:hover {
    background: var(--aca-border);
    color: var(--aca-text-primary);
}

.aca-btn-send-email {
    background: var(--aca-primary);
    color: white;
}

.aca-btn-send-email:hover:not(:disabled) {
    background: var(--aca-primary-dark);
}

.aca-btn-send-email:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Email Success Panel */
.aca-email-success-panel {
    display: none;
    text-align: center;
    padding: 20px 16px;
}

.aca-email-success-panel.aca-show {
    display: block;
}

.aca-email-success-panel svg {
    width: 40px;
    height: 40px;
    color: #22c55e;
    margin-bottom: 8px;
}

.aca-email-success-panel p {
    font-size: 14px;
    font-weight: 500;
    color: var(--aca-text-primary);
    margin: 0 0 12px;
}

.aca-btn-success-close {
    background: var(--aca-primary);
    color: white;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--aca-radius-sm);
    cursor: pointer;
    transition: var(--aca-transition);
    border: none;
    font-family: inherit;
}

.aca-btn-success-close:hover {
    background: var(--aca-primary-dark);
}

/* Animations */
.aca-animate {
    animation: aca-message-in 0.3s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .aca-chat-widget,
    .aca-chat-widget * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus visible styles */
.aca-chat-toggle:focus-visible,
.aca-minimize-btn:focus-visible,
.aca-quick-btn:focus-visible,
.aca-send-btn:focus-visible {
    outline: 2px solid var(--aca-primary);
    outline-offset: 2px;
}

