/**
 * Accore AG-UI Plugin Styles
 * Figma Design Implementation
 *
 * @package Accore
 * @version 1.0.9
 */

/* ========================================
   CSS Variables (from Figma)
   ======================================== */

:root {
    /* Colors from Figma */
    --agui-bg-main: #fcfcf9;
    --agui-bg-sidebar: #f3f3ee;
    --agui-bg-icon-bar: rgba(230, 230, 222, 0.72);
    --agui-bg-header: rgba(252, 252, 249, 0.95);
    --agui-bg-input: #fefefb;
    
    /* Text Colors */
    --agui-text-dark: #13343b;
    --agui-text-body: rgba(19, 52, 59, 0.75);
    --agui-text-muted: rgba(19, 52, 59, 0.48);
    
    /* Accent Colors */
    --agui-blue: #165299;
    --agui-purple: #4e0b62;
    --agui-teal: #31b8c6;
    
    /* Borders */
    --agui-border: rgba(19, 52, 59, 0.1);
    --agui-border-strong: rgba(19, 52, 59, 0.16);
    --agui-overlay: rgba(156, 157, 138, 0.16);
    
    /* Layout Dimensions from Figma */
    --agui-icon-bar-width: 72px;
    --agui-sidebar-width: 193px;
    --agui-header-height: 54px;
    --agui-total-left: 265px;
    
    /* Typography */
    --agui-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --agui-font-secondary: 'Roboto', sans-serif;
}

/* ========================================
   CRITICAL: Hide WordPress Elements
   ======================================== */

/* Hide WP Admin Bar on AG-UI pages */
body.accore-agui-page #wpadminbar,
body.accore-shopping-page #wpadminbar {
    display: none !important;
}

body.accore-agui-page,
body.accore-shopping-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html.accore-agui-page,
html.accore-shopping-page,
html body.accore-agui-page,
html body.accore-shopping-page {
    margin-top: 0 !important;
}

/* Hide ALL theme headers/footers */
body.accore-agui-page .site-header,
body.accore-agui-page .main-header,
body.accore-agui-page #masthead,
body.accore-agui-page header.site-header,
body.accore-agui-page header.header,
body.accore-agui-page .site-footer,
body.accore-agui-page footer,
body.accore-agui-page #colophon,
body.accore-shopping-page .site-header,
body.accore-shopping-page .main-header,
body.accore-shopping-page #masthead,
body.accore-shopping-page header.site-header,
body.accore-shopping-page .site-footer,
body.accore-shopping-page footer {
    display: none !important;
}

/* Reset content wrappers */
body.accore-agui-page .site-content,
body.accore-agui-page #content,
body.accore-agui-page #primary,
body.accore-agui-page main.site-main,
body.accore-agui-page .entry-content,
body.accore-agui-page article.page,
body.accore-shopping-page .site-content,
body.accore-shopping-page #content,
body.accore-shopping-page #primary,
body.accore-shopping-page main.site-main,
body.accore-shopping-page .entry-content,
body.accore-shopping-page article.page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* ========================================
   AG-UI Layout - 3 Column Structure
   ======================================== */
.agui-layout {
    display: flex !important;
    position: relative !important;
    min-height: calc(100vh - 54px);
    width: 100% !important;
    background-color: var(--agui-bg-main) !important;
    font-family: var(--agui-font-secondary);
}

.agui-layout *,
.agui-layout *::before,
.agui-layout *::after {
    box-sizing: border-box;
}

/* ========================================
   Icon Bar (72px) - Left Column
   Figma node 3:4776
   ======================================== */

.agui-icon-bar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 72px !important;
    background-color: rgba(230, 230, 222, 0.72) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 0 !important;
    z-index: 9999 !important;
}

/* Logo at top */
.agui-icon-bar__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.agui-icon-bar__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 38px;
    text-decoration: none;
}

.agui-icon-bar__logo img {
    width: 35px;
    height: 38px;
    object-fit: contain;
    display: block;
}

/* Sidebar Toggle Button */
.agui-icon-bar__sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
}

.agui-icon-bar__sidebar-toggle:hover {
    background-color: rgba(78, 11, 98, 0.1);
}
html {
    margin: 0 !important;
    padding: 0 !important;
    position: initial;
    height: 100%;
}
/* Animated hamburger icon */
.agui-icon-bar__sidebar-toggle .toggle-icon {
    width: 18px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.agui-icon-bar__sidebar-toggle .toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #4E0B62;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Toggle open state - X icon */
.agui-icon-bar__sidebar-toggle[aria-expanded="true"] {
    background-color: rgba(78, 11, 98, 0.1);
}

.agui-icon-bar__sidebar-toggle[aria-expanded="true"] .toggle-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.agui-icon-bar__sidebar-toggle[aria-expanded="true"] .toggle-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.agui-icon-bar__sidebar-toggle[aria-expanded="true"] .toggle-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Account Section at bottom - Container 54px height from design */
.agui-icon-bar__account-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    padding-bottom: 8px;
}

/* Account Trigger Button */
.agui-icon-bar__account-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

/* Avatar Container with arrow */
.agui-icon-bar__avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

/* Avatar styling from Figma */
.agui-icon-bar__avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9999px !important;
    border: 2px solid #fcfcf9 !important;
    box-shadow: 0 0 0 1.5px #165299 !important;
    background-color: rgba(156, 157, 138, 0.1);
    object-fit: cover;
}

/* Avatar placeholder for logged out users */
.agui-icon-bar__avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 2px solid #fcfcf9;
    box-shadow: 0 0 0 1.5px #165299;
    background-color: rgba(156, 157, 138, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(19, 52, 59, 0.75);
}

.agui-icon-bar__avatar-placeholder svg {
    width: 18px;
    height: 18px;
}

/* Dropdown Arrow - positioned to the right of avatar */
.agui-icon-bar__dropdown-arrow {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
}

.agui-icon-bar__dropdown-arrow svg {
    width: 4px;
    height: 7px;
}

/* Arrow rotation on hover and open state */
.agui-icon-bar__account-trigger:hover .agui-icon-bar__dropdown-arrow,
.agui-icon-bar__account-section.is-open .agui-icon-bar__dropdown-arrow {
    transform: translateY(-50%) rotate(90deg);
}

/* Account Label - 11px Roboto from Figma */
.agui-icon-bar__label {
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    text-align: center;
    line-height: 16px;
    letter-spacing: 0.08px;
    color: rgba(19, 52, 59, 0.75);
    margin-top: 4px;
}

/* Dropdown Menu - 206x240px from Figma - positioned at bottom */
.agui-icon-bar__dropdown {
    position: absolute;
    left: 72px;
    bottom: 0;
    width: 206px;
    background-color: #ecece6;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 15px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

/* Dropdown visible state */
.agui-icon-bar__account-section.is-open .agui-icon-bar__dropdown,
.agui-icon-bar__account-section:hover .agui-icon-bar__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Dropdown Menu Links */
.agui-icon-bar__dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.agui-icon-bar__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 32px;
    letter-spacing: 0.16px;
    color: #13343b;
    opacity: 0.45;
    text-decoration: none;
    padding: 2px 0;
    transition: opacity 0.15s ease;
}

.agui-icon-bar__dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.agui-icon-bar__dropdown-item:hover {
    opacity: 1;
    text-decoration: none;
}

/* Active menu item - full opacity */
.agui-icon-bar__dropdown-item.is-active {
    opacity: 1;
}

/* Bottom section wrapper */
.agui-icon-bar__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Cart Link in Icon Bar */
.agui-icon-bar__cart-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 72px;
    color: var(--agui-text-dark);
    text-decoration: none;
    transition: opacity 0.15s ease;
    background-color: transparent;
}

.agui-icon-bar__cart-link:hover {
    opacity: 0.7;
    text-decoration: none;
}
body.woocommerce-account .entry-content {
    display: flex;
    justify-content: center;
    align-items: center;
}
.agui-icon-bar__cart-link svg {
    min-width: 23px;
    height: auto;
}

.agui-icon-bar__cart-link .agui-icon-bar__label {
    margin-top: 0;
}

/* ========================================
   Sidebar (193px) - Second Column
   Figma node 5:4992
   ======================================== */
.agui-icon-bar__cart-link {
	position: relative;
}
.agui-sidebar {
    position: fixed !important;
    left: 72px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 193px !important;
    background-color: #f3f3ee !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 999 !important;
    transform: translateX(-193px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}
#accore-cart-count {
	position: absolute;
	top: -4px;
	right: 18px;
	min-width: 14px;
	height: 14px;
	padding: 0 3px;
	border-radius: 7px;
	background: #4e0b62;
	color: #fff;
	font-size: 9px;
	font-weight: 600;
	line-height: 14px;
	text-align: center;
}
/* Sidebar visible state */
.agui-sidebar.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.agui-sidebar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 100%);
}

.agui-sidebar__header {
    padding: 28px 15px 16px 15px;
}

.agui-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--agui-text-dark);
    font-size: 14px;
    font-family: var(--agui-font-secondary);
    font-weight: 400;
    letter-spacing: 0.08px;
    line-height: 20px;
}

.agui-sidebar__brand:hover {
    text-decoration: none;
    color: var(--agui-text-dark);
}

.agui-sidebar__brand svg {
    width: 16px;
    height: 18px;
    flex-shrink: 0;
}

.agui-sidebar__brand img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
}

.agui-sidebar__divider {
    height: 1px;
    background-color: rgba(156, 157, 138, 0.16);
    margin: 0 15px;
}

.agui-sidebar__section {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}
.agui-sidebar__section-header {
    padding: 9px 15px 16px 15px;
}
ul.agui-sidebar__history {
    padding: 9px 15px 16px;
}
.agui-sidebar__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0px;
}

html body .agui-sidebar__section-title {
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: var(--agui-font-secondary) !important;
    color: rgba(19, 52, 59, 0.75) !important;
    letter-spacing: 0.08px;
    line-height: 16px;
    text-transform: none;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    outline: none !important;
    flex: 1;
    min-width: 0;
    background: transparent !important;
    outline: none !important;
    height: min-content !important;
        box-shadow: initial !important;
}

.agui-sidebar__section-title::placeholder {
    color: rgba(19, 52, 59, 0.75);
    opacity: 1;
}

.agui-sidebar__section-title:focus::placeholder {
    color: rgba(19, 52, 59, 0.4);
}
.agui-sidebar__add svg {
    min-width: 14px;
}
.agui-sidebar__add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 24px;
    border: none;
    padding: 0;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--agui-text-dark);
    transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.15s ease;
}
.agui-sidebar__add:Hover{
    color: var(--agui-text-dark) !important;
}
.agui-sidebar__add.is-visible {
    opacity: 1;
    visibility: visible;
}

.agui-sidebar__add svg {
    width: 14px;
    height: 14px;
}

.agui-sidebar__history {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: calc(100% - 50px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar history */
.agui-sidebar__history::-webkit-scrollbar {
    width: 4px;
}

.agui-sidebar__history::-webkit-scrollbar-track {
    background: transparent;
}

.agui-sidebar__history::-webkit-scrollbar-thumb {
    background: rgba(19, 52, 59, 0.15);
    border-radius: 4px;
}

.agui-sidebar__history::-webkit-scrollbar-thumb:hover {
    background: rgba(19, 52, 59, 0.3);
}

.agui-sidebar__history-item {
    margin-bottom: 0;
    position: relative;
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

.agui-sidebar__history-item[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.agui-sidebar__history-link {
    display: block;
    position: relative;
    padding: 6px 8px;
    margin: 0 -8px;
    font-size: 14px;
    font-family: var(--agui-font-secondary);
    color: var(--agui-text-dark);
    text-decoration: none;
    letter-spacing: 0.08px;
    line-height: 20px;
    border-radius: 6px;
    transition: background 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gradient overlay for text truncation */
.agui-sidebar__history-link::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(243, 243, 238, 0) 0%, rgba(243, 243, 238, 1) 100%);
    border-radius: 0 6px 6px 0;
    pointer-events: none;
}

.agui-sidebar__history-link:hover {
    text-decoration: none;
    background: linear-gradient(to right, rgba(156, 157, 138, 0.16) 0%, rgba(156, 157, 138, 0.16) 79%, rgba(156, 157, 138, 0) 94%);
}

.agui-sidebar__history-link:hover::after {
    background: linear-gradient(to right, rgba(156, 157, 138, 0) 0%, rgba(156, 157, 138, 0.16) 100%);
}

.agui-sidebar__history-empty {
    font-size: 14px;
    font-family: var(--agui-font-secondary);
    color: rgba(19, 52, 59, 0.5);
    font-style: italic;
    padding: 6px 0;
}

.agui-sidebar__history-loader {
    font-size: 13px;
    font-family: var(--agui-font-secondary);
    color: rgba(19, 52, 59, 0.6);
    padding: 8px 0;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========================================
   Main Content Area (Starting at 265px)
   ======================================== */

.agui-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #fcfcf9 !important;
    position: relative; /* For prompts panel positioning */
}

/* ========================================
   Header (54px) - Tab Navigation
   Only shown when there are results
   ======================================== */

.agui-header {
    position: sticky;
    top: 0;
    height: 54px;
    background-color: rgba(252, 252, 249, 0.95);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(19, 52, 59, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 800;
}

/* Hide header on new chat (empty state) */
.agui-main--new-chat .agui-header {
    display: none;
}

.agui-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.agui-header__tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    height: 54px;
    border: none;
    background: transparent;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--agui-text-dark);
    text-decoration: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.agui-header__tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.agui-header__tab:hover {
    opacity: 0.8;
    text-decoration: none;
}

.agui-header__tab--active {
    opacity: 1;
}

.agui-header__tab--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--agui-text-dark);
}

.agui-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* My Account Link */
.agui-header__account-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--agui-text-dark);
    transition: background-color 0.15s ease;
}

.agui-header__account-link:hover {
    background-color: rgba(19, 52, 59, 0.08);
}

.agui-header__account-link svg {
    width: 18px;
    height: 18px;
}

/* Cart Button */
.agui-header__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--agui-text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.agui-header__cart:hover {
    background-color: rgba(19, 52, 59, 0.08);
    text-decoration: none;
}

.agui-header__cart svg {
    width: 18px;
    height: 18px;
}

.agui-header__cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background-color: var(--agui-purple);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

/* Share Button */
.agui-header__share {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    background-color: #20b2aa;
    color: #fff;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.agui-header__share:hover {
    background-color: #1a9a93;
}

.agui-header__share svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   WooCommerce AG-UI Header (Fixed Top)
   Figma node 3:608 - 54px height, centered nav
   ======================================== */

.accore-agui-header {
    position: fixed !important;
    top: 0 !important;
    left: 0px !important;
    right: 0 !important;
    height: 54px !important;
    background-color: rgba(252, 252, 249, 0.95) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border-bottom: 1px solid rgba(19, 52, 59, 0.1) !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
}

.accore-agui-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 18px;
    position: relative;
}

.accore-agui-header__left {
    flex: 1;
    min-width: 40px;
}

.accore-agui-header__nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 24px;
}

.accore-agui-header__nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    height: 53px;
    text-decoration: none;
    color: var(--agui-text-dark);
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08px;
    line-height: 20px;
    transition: opacity 0.15s ease;
}

.accore-agui-header__nav-item:hover {
    text-decoration: none;
    opacity: 0.8;
}

.accore-agui-header__nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.accore-agui-header__nav-icon svg {
    width: 18px;
    height: 18px;
}

.accore-agui-header__nav-label {
    white-space: nowrap;
}

.accore-agui-header__nav-item--active {
    opacity: 1;
}

.accore-agui-header__nav-item--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 4.08%;
    right: 4.08%;
    height: 2px;
    background-color: var(--agui-text-dark);
}

.accore-agui-header__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 40px;
}

.accore-agui-header__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--agui-text-dark);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.accore-agui-header__cart:hover {
    background-color: rgba(19, 52, 59, 0.08);
    text-decoration: none;
}

.accore-agui-header__cart svg {
    width: 17px;
    height: 17px;
}

.accore-agui-header__cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background-color: var(--agui-purple);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}
li.agui-sidebar__history-item {
    min-width: 163px;
    height: 32px;
    text-overflow: ellipsis;
}

/* ========================================
   Content Area
   ======================================== */

/* Results view - scrollable area */
.agui-content__inner {
    max-width: 740px;
    width: 100%;
}

/* Transition state for smooth view switching */
.agui-main--transitioning .agui-content {
    transition: opacity 0.2s ease-out;
}

.agui-content {
    transition: opacity 0.2s ease-in;
}

/* New Chat view - Centered */
.agui-main--new-chat .agui-content {
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: visible;
}

.agui-main--new-chat .agui-content__inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
}

/* Hide fixed input on new chat view */
.agui-main--new-chat .agui-fixed-input-container {
    display: none;
}

/* ========================================
   NEW CHAT - Logo/Branding (Centered)
   Figma node 0:1103
   ======================================== */

.agui-new-chat__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    height: 54px;
}
.agui-new-chat__logo img {
    height: 53.839px;
    object-fit: contain;
    width: 220px;
}

.agui-new-chat__logo-text {
    font-family: var(--agui-font-primary);
    font-size: 42px;
    font-weight: 300;
    color: var(--agui-text-dark);
    letter-spacing: -1px;
}

/* ========================================
   NEW CHAT - Search Input Box
   Figma: 640px wide, 122px tall, centered
   ======================================== */

.agui-search-box {
    width: 640px;
    max-width: 100%;
    height: 50px;
    background: #fefefb;
    border: 1px solid rgba(19, 52, 59, 0.16);
    border-radius: 16px;
    box-shadow: 0px 1px 2px 0px rgba(22, 82, 153, 0.1);
    padding: 0 10px 0 14px;
    display: flex;
    align-items: center;
}

.agui-search-box__input-area {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.agui-search-box__input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-family: var(--agui-font-primary);
    font-size: 15.8px;
    color: var(--agui-text-dark);
    line-height: 24px;
    outline: none !important;
    height: 24px;
    box-shadow: none !important;
    letter-spacing: 0.08px;
    -webkit-appearance: none;
    appearance: none;
}

.agui-search-box__input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.agui-search-box__input::placeholder {
    color: rgba(19, 52, 59, 0.48);
}

/* Submit Button - Muted gray per Figma node 4-4807 */
.agui-search-box__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    padding: 0;
    border: none;
    background-color: rgba(156, 157, 138, 0.16);
    border-radius: 8px;
    color: rgba(19, 52, 59, 0.75);
    cursor: default;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.15s ease;
    pointer-events: none;
}

/* Active state when input has > 3 chars */
.agui-search-box__submit.is-active {
    background-color: rgba(78, 11, 98, 1);
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.agui-search-box__submit.is-active svg path {
    stroke: #fff;
    stroke-opacity: 1;
}

.agui-search-box__submit.is-active:hover {
    background-color: rgba(98, 20, 120, 1);
}

.agui-search-box__submit svg {
    width: 16px;
    min-width: 16px;
    height: 16px;
    display: block;
    fill: none;
}

.agui-search-box__submit svg path {
    stroke: currentColor;
}

.agui-search-box__submit.is-active svg path {
    stroke: #fff;
    stroke-opacity: 1;
}

/* Legacy controls (hidden in simplified mode) */
.agui-search-box__controls {
    display: none;
}

/* ========================================
   RESULTS VIEW - Follow-up Input
   ======================================== */

.agui-content__title {
    font-family: var(--agui-font-primary);
    font-size: 30px;
    font-weight: 500;
    color: var(--agui-text-dark);
    line-height: 36px;
    letter-spacing: 0.08px;
    margin: 0 0 24px 0;
}

/* ========================================
   TABS BAR - Figma node 17-331
   ======================================== */

.agui-tabs-bar {
    display: flex;
    align-items: center;
    gap: 0;
    height: 44px;
    border-bottom: 1px solid rgba(19, 52, 59, 0.1);
    margin-bottom: 24px;
    position: sticky;
    top: 76px; /* Below the sticky title (24px padding + 36px line-height + 16px padding) */
    background: #fcfcf9;
    z-index: 50;
}

/* Gradient fade below sticky tabs bar */
.agui-tabs-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    height: 20px;
    background: linear-gradient(180deg, #fcfcf9 0%, rgba(252, 252, 249, 0) 100%);
    pointer-events: none;
}

.agui-tabs-bar__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--agui-text-dark);
    letter-spacing: 0.08px;
    line-height: 20px;
    position: relative;
    outline: none;
    transition: color 0.2s ease;
}

.agui-tabs-bar__btn:hover {
    color: var(--agui-teal);
}

.agui-tabs-bar__btn:focus,
.agui-tabs-bar__btn:active,
.agui-tabs-bar__btn:focus-visible {
    background: none;
    outline: none;
    box-shadow: none;
}

.agui-tabs-bar__btn--active,
.agui-tabs-bar__btn--active:hover,
.agui-tabs-bar__btn--active:focus,
.agui-tabs-bar__btn--active:active {
    color: var(--agui-text-dark);
}

.agui-tabs-bar__btn--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #13343B;
    border-radius: 1px 1px 0 0;
}

.agui-tabs-bar__btn--filter {
    margin-left: auto;
}

.agui-tabs-bar__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.agui-tabs-bar__label {
    white-space: nowrap;
}

.agui-sources {
    margin-bottom: 16px;
}

.agui-sources__images {
    display: flex;
    gap: 8px;
}

.agui-sources__image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    border: 0.5px solid rgba(19, 52, 59, 0.13);
    background-color: #f0f0ec;
}

.agui-answer {
    margin-bottom: 50px;
    padding-right: 8px;
}

/* Custom scrollbar for answer/chat area */
#agui-answer::-webkit-scrollbar,
.agui-content::-webkit-scrollbar {
    width: 6px;
}

#agui-answer::-webkit-scrollbar-track,
.agui-content::-webkit-scrollbar-track {
    background: transparent;
}

#agui-answer::-webkit-scrollbar-thumb,
.agui-content::-webkit-scrollbar-thumb {
    background: rgba(32, 128, 141, 0.2);
    border-radius: 6px;
}

#agui-answer::-webkit-scrollbar-thumb:hover,
.agui-content::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 128, 141, 0.4);
}

/* Firefox scrollbar support */
#agui-answer,
.agui-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(32, 128, 141, 0.2) transparent;
}

.agui-sidebar__history {
    scrollbar-width: thin;
    scrollbar-color: rgba(19, 52, 59, 0.15) transparent;
}

.agui-answer__intro {
    font-family: var(--agui-font-secondary);
    font-size: 14px;
    color: rgba(19, 52, 59, 0.75);
    line-height: 20px;
    letter-spacing: 0.08px;
    margin: 0;
}

/* Follow-up input (Results page) */
.agui-followup {
    margin-top: auto;
    padding-bottom: 24px;
}

.agui-followup__input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fefefb;
    border: 1px solid rgba(19, 52, 59, 0.16);
    border-radius: 16px;
    box-shadow: 0px 1px 2px 0px rgba(22, 82, 153, 0.1);
    padding: 12px 14px;
}

.agui-followup__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--agui-font-primary);
    font-size: 15.9px;
    color: var(--agui-text-dark);
    line-height: 24px;
    resize: none;
    outline: none;
    min-height: 24px;
}

.agui-followup__input::placeholder {
    color: rgba(19, 52, 59, 0.48);
}

.agui-followup__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--agui-purple);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.agui-followup__submit:hover {
    background-color: #5e1472;
}

.agui-followup__submit svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   Product Slider - Figma node 13-302
   ======================================== */

.agui-products-slider {
    position: relative;
    margin-bottom: 24px;
}

/* Sources Toggle - Above images per Figma */
.agui-products-slider__sources {
    margin-bottom: 12px;
}

.agui-products-slider__sources-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--agui-text-dark);
    cursor: pointer;
    transition: color 0.2s ease;
}

.agui-products-slider__sources-toggle:hover {
    color: var(--agui-blue);
}

.agui-products-slider__sources-arrow {
    transition: transform 0.2s ease;
}

.agui-products-slider__sources-toggle.is-expanded .agui-products-slider__sources-arrow {
    transform: rotate(90deg);
}

.agui-products-slider__sources-list {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--agui-bg-sidebar);
    border-radius: 12px;
}

.agui-products-slider__source-link {
    display: block;
    padding: 8px 0;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    color: var(--agui-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--agui-border);
    transition: color 0.15s ease;
}

.agui-products-slider__source-link:last-child {
    border-bottom: none;
}

.agui-products-slider__source-link:hover {
    color: var(--agui-purple);
    text-decoration: underline;
}

/* Slider empty state */
.agui-products-slider__empty {
    padding: 40px 20px;
    text-align: center;
    font-family: var(--agui-font-primary);
    font-size: 15px;
    color: var(--agui-text-muted);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin: 16px 0;
}

/* Slider Container */
.agui-products-slider__container {
    position: relative;
    overflow: hidden;
}

.agui-products-slider__track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
}

.agui-products-slider__item {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--agui-bg-sidebar);
    border: 1px solid rgba(19, 52, 59, 0.06);
}

.agui-products-slider__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Navigation Arrows */
.agui-products-slider__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: 1px solid var(--agui-border);
	border-radius: 50%;
	background: #fff;
	color: var(--agui-text-dark);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 2;
	max-width: 32px;
	box-sizing: border-box;
	gap: 0;
	line-height: initial;
	font-size: initial;
	padding: 0;
}

.agui-products-slider__nav:hover {
    background: var(--agui-bg-sidebar);
    border-color: var(--agui-border-strong);
}

.agui-products-slider__nav--prev {
    left: 8px;
}

.agui-products-slider__nav--next {
    right: 8px;
}

.agui-products-slider__nav.is-hidden {
    display: none;
}

/* ========================================
   Chat Messages & Responses
   Figma node 11-243 design implementation
   ======================================== */

.agui-message {
    margin-bottom: 24px;
}

/* User message - bubble style for follow-ups */
.agui-message--user {
    display: block !important;
    margin-top: 32px;
    margin-bottom: 16px;
    text-align: right;
}

/* Hide first user message since it's already shown in the sticky h1 title */
#agui-answer > .agui-message--user:first-child {
    display: none !important;
}

.agui-message--user .agui-message__content {
    font-family: var(--agui-font-primary);
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    line-height: 22px;
    background: #20808d;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    max-width: 70%;
    text-align: left;
}

.agui-message--assistant .agui-message__content {
    font-family: var(--agui-font-secondary);
    font-size: 16px;
    color: var(--agui-text-body);
    line-height: 26px;
    letter-spacing: 0.08px;
}

.agui-message--assistant .agui-message__content p {
    margin: 0 0 16px 0;
}

.agui-message--assistant .agui-message__content p:last-child {
    margin-bottom: 0;
}

/* Response Headings - Blue color per Figma #165299 */
.agui-message--assistant .agui-message__content h3,
.agui-response__heading {
    font-family: var(--agui-font-primary);
    font-size: 18px;
    font-weight: 600;
    color: var(--agui-blue);
    margin: 24px 0 12px 0;
    line-height: 26px;
}

.agui-message--assistant .agui-message__content h3:first-child,
.agui-response__heading:first-child {
    margin-top: 0;
}

.agui-message--assistant .agui-message__content h4,
.agui-response__subheading {
    font-family: var(--agui-font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--agui-text-dark);
    margin: 16px 0 8px 0;
}

/* Bold text in responses */
.agui-message--assistant .agui-message__content strong {
    font-weight: 600;
    color: var(--agui-text-dark);
}

/* Italic text in responses */
.agui-message--assistant .agui-message__content em {
    font-style: italic;
    color: var(--agui-text-body);
}

/* Links in responses */
.agui-message--assistant .agui-message__content a {
    color: var(--agui-blue);
    text-decoration: underline;
    transition: color 0.15s ease;
}

.agui-message--assistant .agui-message__content a:hover {
    color: var(--agui-purple);
    text-decoration: underline;
}

/* Code blocks in responses */
.agui-message--assistant .agui-message__content pre {
    background-color: rgba(19, 52, 59, 0.06);
    border: 1px solid rgba(19, 52, 59, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
}

.agui-message--assistant .agui-message__content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 20px;
    color: var(--agui-text-dark);
}

.agui-message--assistant .agui-message__content pre code {
    background: none;
    border: none;
    padding: 0;
    display: block;
}

/* Inline code */
.agui-message--assistant .agui-message__content :not(pre) > code {
    background-color: rgba(19, 52, 59, 0.08);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 14px;
}

/* Lists in responses */
.agui-message--assistant .agui-message__content ul,
.agui-response__list {
    margin: 12px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.agui-message--assistant .agui-message__content li {
    margin-bottom: 8px;
    line-height: 24px;
}

/* Nested lists */
.agui-message--assistant .agui-message__content li ul,
.agui-message--assistant .agui-message__content li ol {
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Line breaks */
.agui-message--assistant .agui-message__content br {
    display: block;
    content: "";
    margin-top: 8px;
}

/* ========================================
   Skeleton Loading Animation
   Animated placeholders for AI responses
   ======================================== */

.agui-skeleton {
    padding: 8px 0;
}

.agui-skeleton__line {
    height: 16px;
    background: linear-gradient(
        90deg,
        rgba(19, 52, 59, 0.06) 0%,
        rgba(19, 52, 59, 0.12) 50%,
        rgba(19, 52, 59, 0.06) 100%
    );
    background-size: 200% 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.agui-skeleton__line--full {
    width: 100%;
}

.agui-skeleton__line--medium {
    width: 75%;
}

.agui-skeleton__line--short {
    width: 50%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   Error Messages
   ======================================== */

.agui-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.agui-error svg {
    flex-shrink: 0;
    color: #dc3545;
}

.agui-error span {
    font-family: var(--agui-font-secondary);
    font-size: 14px;
    color: #dc3545;
    line-height: 20px;
}

/* ========================================
   Current History Item Indicator
   ======================================== */

.agui-sidebar__history-item--current .agui-sidebar__history-link {
    background: rgba(78, 11, 98, 0.08);
    font-weight: 500;
}

.agui-sidebar__history-item--current .agui-sidebar__history-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background-color: var(--agui-purple);
    border-radius: 0 2px 2px 0;
}
main.agui-main.chat_opened .agui-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
    margin: auto;
    padding-top: 54px;
    padding-bottom: 100px !important;
}
.agui-fixed-input-container {
    padding: 0 !important;
    justify-content: center !important;
    z-index: 100 !important;
    padding-bottom: 50px !important;
}
main.agui-main.chat_opened .agui-search-box {
    width: 100%;
    max-width: 740px;
}
main.agui-main.chat_opened .agui-content {
    width: 100%;
    max-width: 740px;
}

/* ========================================
   Layout with Prompts Panel
   Adjustments when right-side prompts panel is visible
   ======================================== */

.agui-layout.has-prompts-panel main.agui-main.chat_opened {
    align-items: center;
}

.agui-layout.has-prompts-panel main.agui-main.chat_opened .agui-content {
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.agui-layout.has-prompts-panel .agui-fixed-input-container {
    right: 240px;
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

@media (max-width: 1200px) {
    .agui-content__inner {
        margin-left: 0;
    }
    
    .agui-search-box {
        width: 100%;
        max-width: 640px;
    }
}

@media (max-width: 1024px) {
    .agui-sidebar {
        display: none !important;
    }
    
    .agui-main {
        margin-left: 72px !important;
    }
    
    /* Adjust content padding when sidebar hidden */
    .agui-content {
        padding-left: 24px !important;
    }
    
    .agui-fixed-input-container {
        padding-left: 24px !important;
    }
    
    /* Adjust header position when sidebar is hidden */
    .accore-agui-header {
        left: 72px !important;
    }
}

@media (max-width: 768px) {
    .agui-icon-bar {
        width: 60px !important;
    }
    
    .agui-main {
        margin-left: 60px !important;
    }
    
    /* Adjust header for smaller screens */
    .accore-agui-header {
        left: 60px !important;
    }
    
    .accore-agui-header__nav-item {
        font-size: 13px;
    }
    
    .agui-header__nav {
        gap: 12px;
    }
    
    .agui-header__tab {
        font-size: 13px;
    }
    
    .agui-content__title {
        font-size: 24px;
    }
    
    .agui-search-box {
        width: calc(100% - 32px);
    }
    
    .agui-new-chat__logo-text {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .agui-icon-bar {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        padding: 8px 0 !important;
    }
    
    .agui-icon-bar__top,
    .agui-icon-bar__nav,
    .agui-icon-bar__bottom {
        flex-direction: row;
    }
    
    .agui-main {
        margin-left: 0 !important;
        margin-bottom: 60px !important;
    }
    
    /* Header full width on mobile */
    .accore-agui-header {
        left: 0 !important;
        padding-top: 0 !important;
    }
    
    .accore-agui-header__inner {
        padding: 0 12px;
    }
    
    body.accore-agui-page .agui-main {
        padding-top: 54px !important;
    }
    
    .agui-search-box__controls {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ========================================
   Cart Sidebar (Figma node 3:527)
   ======================================== */

.agui-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.agui-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.agui-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 390px;
    max-width: 100%;
    background-color: #13343b;
    box-shadow: -18px 0 17.9px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.agui-cart-sidebar.is-open {
    transform: translateX(0);
}

.agui-cart-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
}

.agui-cart-sidebar__title {
    margin: 0;
    font-family: var(--agui-font-primary);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.agui-cart-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #fff;
    cursor: pointer;
}

.agui-cart-sidebar__close:hover {
    opacity: 0.7;
    background: transparent !important;
}

.agui-cart-sidebar__close svg {
    width: 13px;
    height: 13px;
    min-width: 13px;
}

.agui-cart-sidebar__content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Cart Items */
.agui-cart-sidebar__items {
    list-style: none;
    margin: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.agui-cart-sidebar__item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.agui-cart-sidebar__item:last-child {
    border-bottom: none;
}

.agui-cart-sidebar__item-image {
    flex-shrink: 0;
    width: 83px;
    height: 83px;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.agui-cart-sidebar__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agui-cart-sidebar__item-image a {
    display: block;
}

.agui-cart-sidebar__item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agui-cart-sidebar__item-name {
    margin: 0;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

.agui-cart-sidebar__item-name a {
    color: inherit;
    text-decoration: none;
}

.agui-cart-sidebar__item-name a:hover {
    text-decoration: underline;
}

.agui-cart-sidebar__item-qty {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.agui-cart-sidebar__item-price {
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Item Thumbnail */
.agui-cart-sidebar__item-thumb {
    flex-shrink: 0;
    width: 83px;
    height: 83px;
    border-radius: 7px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.agui-cart-sidebar__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agui-cart-sidebar__item-thumb a {
    display: block;
}

/* Item Header (name + price row) */
.agui-cart-sidebar__item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.agui-cart-sidebar__item-header .agui-cart-sidebar__item-name {
    flex: 1;
    max-width: 192px;
}

/* Item Controls (quantity + remove) */
.agui-cart-sidebar__item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

/* Quantity Controls */
.agui-cart-sidebar__quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agui-cart-sidebar__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agui-cart-sidebar__qty-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.agui-cart-sidebar__qty-btn svg {
    width: 12px;
    height: 12px;
}

.agui-cart-sidebar__qty-value {
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

/* Remove Button */
.agui-cart-sidebar__remove {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.48);
    font-family: var(--agui-font-primary);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s ease;
    padding: 4px 0;
}

.agui-cart-sidebar__remove:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Subtotal Section (legacy) */
.agui-cart-sidebar__divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 16px 0;
}

/* Empty Cart */
.agui-cart-sidebar__empty {
    text-align: center;
    padding: 60px 20px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    flex: 1;
}

.agui-cart-sidebar__empty svg {
    display: block !important;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 1;
}

.agui-cart-sidebar__empty p,
.agui-cart-sidebar__empty-text {
    display: block !important;
    margin: 0 0 24px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.agui-cart-sidebar__continue-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.agui-cart-sidebar__continue-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: #fff;
}

/* Footer */
.agui-cart-sidebar__footer {
    padding: 0;
    border-top: none;
    margin-top: auto;
}

/* Cart Totals Section (matching cart page design) */
.agui-cart-sidebar__totals {
    padding: 24px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.agui-cart-sidebar__totals-title {
    font-family: var(--agui-font-primary);
    font-weight: 700;
    font-size: 20px;
    line-height: 30px;
    color: #fff;
    margin: 0 0 24px 0;
}

.agui-cart-sidebar__totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.agui-cart-sidebar__totals-label {
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: rgba(255, 255, 255, 0.7);
}

.agui-cart-sidebar__totals-value {
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    color: #fff;
}

.agui-cart-sidebar__shipping-note {
    font-weight: 400;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.agui-cart-sidebar__totals-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 20px 0;
}

.agui-cart-sidebar__totals-row--total {
    margin-bottom: 0;
}

.agui-cart-sidebar__totals-row--total .agui-cart-sidebar__totals-label {
    font-weight: 600;
    color: #fff;
}

.agui-cart-sidebar__totals-value--total {
    font-size: 18px;
    font-weight: 700;
}

/* Legacy subtotal styles (for backwards compatibility) */
.agui-cart-sidebar__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.agui-cart-sidebar__subtotal-label {
    font-family: var(--agui-font-primary);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.agui-cart-sidebar__subtotal-value {
    font-family: var(--agui-font-primary);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.agui-cart-sidebar__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 24px;
}

.agui-cart-sidebar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border-radius: 8px;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agui-cart-sidebar__btn--outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
}

.agui-cart-sidebar__btn--outline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.agui-cart-sidebar__btn--solid {
    border: none;
    background-color: #fff;
    color: var(--agui-purple);
}

.agui-cart-sidebar__btn--solid:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.agui-cart-sidebar__btn--solid svg {
    width: 16px;
    height: 16px;
}

/* Primary button variant (same as solid) */
.agui-cart-sidebar__btn--primary {
    border: none;
    background-color: #fff;
    color: #4e0b62;
}

.agui-cart-sidebar__btn--primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #4e0b62;
    text-decoration: none;
}

.agui-cart-sidebar__btn--primary svg {
    width: 16px;
    height: 16px;
}

/* Cart Sidebar Mobile */
@media (max-width: 480px) {
    .agui-cart-sidebar {
        width: 100%;
    }
}

/* Body state when cart is open - prevent scroll without CLS */
body.agui-cart-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
}

/* Prevent header shift when body scroll is locked */
body.agui-cart-open .agui-header,
body.agui-cart-open .agui-icon-bar {
    padding-right: var(--scrollbar-width, 0px);
}

/* ========================================
   Fixed Follow-up Input (Figma 11:243)
   Chat Layout - 100vh with fixed input at bottom
   ======================================== */

.agui-main {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-left: 72px !important; /* Clear icon bar */
    background-color: #fcfcf9;
}

/* Chat opened state - full viewport height */
.agui-main.chat_opened {
    height: 100vh;
}

/* Scrollable content area */
.agui-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 40px 217px; /* Left 193+24=217 (Clear sidebar) */
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

/* Chat opened content - no bottom padding, input is fixed outside */
.agui-main.chat_opened .agui-content {
    padding-bottom: 40px;
}

.agui-content__inner {
    max-width: 740px;
    width: 100%;
    margin: 0; /* Align left */
}

/* Sticky title at top */
.agui-content__title {
    position: sticky;
    top: 0;
    z-index: 51;
    background-color: #fcfcf9;
    padding: 24px 0 16px 0;
    margin-top: 0;
    margin-bottom: 0;
    font-family: var(--agui-font-primary);
    font-size: 30px;
    font-weight: 500;
    color: var(--agui-text-dark);
    line-height: 36px;
    letter-spacing: 0.08px;
}

/* ========================================
   Fixed Input Container at Bottom
   Same styles as new chat search box
   ======================================== */

.agui-fixed-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 24px 40px 217px; /* Match content padding-left */
    background: #fcfcf9;
    display: flex;
    justify-content: flex-start;
    z-index: 100;
}

/* Gradient fade effect for messages going behind input */
.agui-fixed-input-container::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(252, 252, 249, 0) 0%, #fcfcf9 100%);
    pointer-events: none;
}

/* Search box in fixed container - SAME as new chat */
.agui-fixed-input-container .agui-search-box {
    width: 640px;
    max-width: 100%;
    height: 50px;
    background: #fefefb;
    border: 1px solid rgba(19, 52, 59, 0.16);
    border-radius: 16px;
    box-shadow: 0px 1px 2px 0px rgba(22, 82, 153, 0.1);
    padding: 0 10px 0 14px;
    display: flex;
    align-items: center;
}

/* Fix for input arrows/spinners - Force hide */
.agui-search-box__input::-webkit-outer-spin-button,
.agui-search-box__input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}
.agui-search-box__input {
    -moz-appearance: textfield !important;
}

/* ========================================
   PROMPT TABS PANEL (Top Right of Content)
   Floating panel showing all prompts in current chat
   ======================================== */

.agui-prompts-panel {
    position: absolute;
    top: 140px;
    width: 220px;
    max-height: 400px;
    /* background-color: #fff; */
    border: 1px solid rgb(19 52 59 / 5%);
    border-radius: 12px;
    /* box-shadow: 0 4px 20px rgba(19, 52, 59, 0.08); */
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    margin: auto;
    margin-left: 1000px;
}
/* Show only when has 2+ prompts (controlled via JS adding class) */
.agui-main.chat_opened .agui-prompts-panel {
    display: none; /* Hidden by default even when chat opened */
}

/* Show only when has multiple prompts */
.agui-main.chat_opened .agui-prompts-panel.has-multiple-prompts {
    display: flex;
}

/* Header hidden - only showing list */
.agui-prompts-panel__header {
    display: none;
}

.agui-prompts-panel__list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    list-style: none;
    margin: 0;
    max-height: 380px;
}
button.agui-prompts-panel__link {
    border-radius: 10px !important;
}
/* Custom scrollbar for prompts panel */
.agui-prompts-panel__list::-webkit-scrollbar {
    width: 4px;
}

.agui-prompts-panel__list::-webkit-scrollbar-track {
    background: transparent;
}

.agui-prompts-panel__list::-webkit-scrollbar-thumb {
    background: rgba(19, 52, 59, 0.15);
    border-radius: 4px;
}

.agui-prompts-panel__item {
    margin: 0;
    padding: 0;
}

.agui-prompts-panel__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--agui-font-secondary);
    font-size: 13px;
    color: var(--agui-text-dark) !important;
    text-decoration: none;
    line-height: 18px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.agui-prompts-panel__link:hover {
    background-color: rgba(19, 52, 59, 0.04);
    text-decoration: none;
}

/* Prompt number indicator */
.agui-prompts-panel__number {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(19, 52, 59, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--agui-text-dark);
}

.agui-prompts-panel__text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Active/Current prompt state */
.agui-prompts-panel__item--active .agui-prompts-panel__link {
    background-color: rgba(78, 11, 98, 0.08);
    font-weight: 500;
}

.agui-prompts-panel__item--active .agui-prompts-panel__link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background-color: var(--agui-purple);
    border-radius: 0 2px 2px 0;
}

.agui-prompts-panel__item--active .agui-prompts-panel__number {
    background-color: var(--agui-purple);
    color: #fff;
}

/* Prompt with products indicator */
.agui-prompts-panel__item--has-products .agui-prompts-panel__link::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--agui-teal);
}

/* Empty state */
.agui-prompts-panel__empty {
    padding: 16px 14px;
    font-size: 12px;
    color: rgba(19, 52, 59, 0.5);
    text-align: center;
    font-style: italic;
}

/* Fade animation for content switching */
.agui-answer {
    transition: opacity 0.15s ease;
}

.agui-answer.is-switching {
    opacity: 0.5;
}

/* ========================================
   Main Content Adjustments for Prompts Panel
   ======================================== */

/* Panel is now floating, no margin adjustment needed */
.agui-layout.has-prompts-panel .agui-main.chat_opened {
    margin-right: 0;
}

.agui-layout.has-prompts-panel .agui-fixed-input-container {
    right: 0;
}

/* ========================================
   Single Prompt View (Scrollable)
   ======================================== */

.agui-prompt-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.agui-prompt-view--active {
    display: flex;
}

.agui-prompt-view__content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 100px 24px;
}

.agui-prompt-view__header {
    position: sticky;
    top: 0;
    z-index: 51;
    background-color: #fcfcf9;
    padding: 24px 0 0 0;
}

.agui-prompt-view__title {
    font-family: var(--agui-font-primary);
    font-size: 30px;
    font-weight: 500;
    color: var(--agui-text-dark);
    line-height: 36px;
    letter-spacing: 0.08px;
    margin: 0 0 24px 0;
}

.agui-prompt-view__response {
    padding-bottom: 40px;
}

/* ========================================
   Conditional Tab Visibility
   Images/Filter tabs hidden by default
   Show only when prompt has products
   ======================================== */

/* Hide Images and Filter by default */
.agui-tabs-bar .agui-tabs-bar__btn[data-tab="images"],
.agui-tabs-bar .agui-tabs-bar__btn[data-tab="filter"] {
    display: none;
}

/* Show Images and Filter when has products */
.agui-tabs-bar.has-products .agui-tabs-bar__btn[data-tab="images"],
.agui-tabs-bar.has-products .agui-tabs-bar__btn[data-tab="filter"] {
    display: flex;
}

/* ========================================
   Images Tab Layout - Figma node 30:251
   Left: Selected product large view
   Right: Product thumbnails grid
   ======================================== */

.agui-images-tab {
    display: none;
}

.agui-images-tab.is-active {
    display: grid;
    grid-template-columns: 1fr 230px;
    grid-template-rows: auto 1fr;
    gap: 24px;
    padding-bottom: 40px;
}

/* Sources spans full width at top */
.agui-images-tab__sources {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

/* Hide answer content when images tab is active */
.agui-answer.is-hidden {
    display: none;
}

/* ----------------------------------------
   Images Tab: Left Panel (Selected Product)
   ---------------------------------------- */

.agui-images-tab__left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Reviewed sources toggle styles */
.agui-images-tab__sources-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--agui-text-dark);
    cursor: pointer;
    transition: color 0.2s ease;
}

.agui-images-tab__sources-toggle:hover {
    color: var(--agui-blue);
}

.agui-images-tab__sources-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.agui-images-tab__sources-toggle.is-expanded .agui-images-tab__sources-arrow {
    transform: rotate(90deg);
}

.agui-images-tab__sources-list {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--agui-bg-sidebar);
    border-radius: 12px;
    flex-direction: column;
    gap: 0;
}

.agui-images-tab__sources-toggle.is-expanded + .agui-images-tab__sources-list {
    display: flex;
}

.agui-images-tab__source-link {
    display: block;
    padding: 8px 0;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    color: var(--agui-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--agui-border);
    transition: color 0.15s ease;
    line-height: 1.4;
}

.agui-images-tab__source-link:last-child {
    border-bottom: none;
}

.agui-images-tab__source-link:hover {
    color: var(--agui-purple);
    text-decoration: underline;
}

/* Images Tab: Empty state */
.agui-images-tab__empty {
    grid-column: 1 / -1;
    padding: 60px 40px;
    text-align: center;
    font-family: var(--agui-font-primary);
    font-size: 16px;
    color: var(--agui-text-muted);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin: 20px 0;
}

/* ----------------------------------------
   Images Tab: Gallery with dots/arrows
   ---------------------------------------- */
.agui-images-tab__gallery {
    position: relative;
    width: 100%;
    max-width: 496px;
    aspect-ratio: 496 / 441;
    border-radius: 5px;
    overflow: hidden;
    background: #f5f5f5;
}

.agui-images-tab__gallery-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.agui-images-tab__gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.agui-images-tab__gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.agui-images-tab__gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: zoom-in;
}

/* Gallery navigation arrows */
.agui-images-tab__gallery-prev,
.agui-images-tab__gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.agui-images-tab__gallery-prev {
    left: 12px;
}

.agui-images-tab__gallery-next {
    right: 12px;
}

.agui-images-tab__gallery-prev:hover,
.agui-images-tab__gallery-next:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.agui-images-tab__gallery-prev svg,
.agui-images-tab__gallery-next svg {
    color: var(--agui-text-dark);
}

/* Gallery dots */
.agui-images-tab__gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.agui-images-tab__gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.agui-images-tab__gallery-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.agui-images-tab__gallery-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

/* Keep old main-image styles for backward compatibility */
.agui-images-tab__main-image {
    width: 100%;
    max-width: 496px;
    aspect-ratio: 496 / 441;
    border-radius: 5px;
    overflow: hidden;
    background: #f5f5f5;
}

.agui-images-tab__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Product title */
.agui-images-tab__title {
    font-family: var(--agui-font-primary);
    font-size: 24px;
    font-weight: 700;
    color: var(--agui-text-dark);
    line-height: 36px;
    letter-spacing: 0.08px;
    margin: 8px 0 12px;
}

/* Price and delivery row */
.agui-images-tab__price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fefefb;
    border: 0.74px solid rgba(19, 52, 59, 0.07);
    border-radius: 12px;
    padding: 10px 16px;
    width: min-content;

}

.agui-images-tab__price {
    font-family: var(--agui-font-primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--agui-text-dark);
    line-height: 1.5;
}

.agui-images-tab__price sup {
    font-size: 11px;
    font-weight: 700;
    vertical-align: top;
}

/* Delivery info - hidden for now */
.agui-images-tab__delivery {
    display: none;
    font-family: var(--agui-font-primary);
    font-size: 9px;
    font-weight: 400;
    color: var(--agui-purple);
    line-height: 1.6;
    opacity: 0.67;
}

.agui-images-tab__delivery strong {
    font-weight: 700;
    text-decoration: underline;
}

/* Action buttons */
.agui-images-tab__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.agui-images-tab__btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: var(--agui-purple);
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.12px;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.agui-images-tab__btn-buy:hover {
    background: #3d0850;
}

.agui-images-tab__btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    background: none;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--agui-text-dark);
    letter-spacing: 0.12px;
    line-height: 24px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.15s ease;
}

.agui-images-tab__btn-cart:hover {
    color: var(--agui-purple);
}

/* ----------------------------------------
   Images Tab: Right Panel (Thumbnails Grid)
   ---------------------------------------- */

.agui-images-tab__right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for thumbnails */
.agui-images-tab__right::-webkit-scrollbar {
    width: 6px;
}

.agui-images-tab__right::-webkit-scrollbar-track {
    background: transparent;
}

.agui-images-tab__right::-webkit-scrollbar-thumb {
    background: rgba(19, 52, 59, 0.15);
    border-radius: 3px;
}

.agui-images-tab__right::-webkit-scrollbar-thumb:hover {
    background: rgba(19, 52, 59, 0.25);
}

/* Grid layout for thumbnails - 2 columns */
.agui-images-tab__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

/* Thumbnail item */
.agui-images-tab__thumb {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background: rgba(87, 101, 96, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.agui-images-tab__thumb:hover {
    border-color: rgba(0, 110, 255, 0.3);
}

/* Selected thumbnail state */
.agui-images-tab__thumb.is-selected {
    border: 2px solid rgb(78, 11, 98) !important
}

.agui-images-tab__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Filtered out state */
.agui-images-tab__thumb.is-filtered-out {
    display: none;
}

/* ========================================
   Images Tab Responsive Styles
   ======================================== */

@media (max-width: 1024px) {
    .agui-images-tab.is-active {
        grid-template-columns: 1fr 180px;
        gap: 16px;
    }
    
    .agui-images-tab__main-image {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .agui-images-tab.is-active {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .agui-images-tab__right {
        order: -1;
        max-height: none;
        overflow-y: visible;
    }
    
    .agui-images-tab__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .agui-images-tab__thumb {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    .agui-images-tab__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .agui-images-tab__title {
        font-size: 20px;
        line-height: 28px;
    }
    
    .agui-images-tab__price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ========================================
   Typewriter Effect / Typing Cursor
   ======================================== */

.agui-typing-cursor {
    display: inline;
    color: var(--agui-purple, #4e0b62);
    font-weight: 400;
    animation: blink-cursor 0.8s step-end infinite;
    margin-left: 1px;
}

@keyframes blink-cursor {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ========================================
   Response Actions Bar (Share, Download, Copy, Like, Dislike)
   Similar to Perplexity UI
   ======================================== */

.agui-response-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}

.agui-response-actions__left,
.agui-response-actions__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.agui-response-actions__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: rgba(19, 52, 59, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
}

.agui-response-actions__btn:hover {
    background-color: rgba(19, 52, 59, 0.06);
    color: var(--agui-text-dark);
}

.agui-response-actions__btn:active {
    background-color: rgba(19, 52, 59, 0.1);
}

.agui-response-actions__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Success state (for copy button) */
.agui-response-actions__btn.is-success {
    color: #22c55e;
}

/* Loading state (for share button) */
.agui-response-actions__btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Active state (for like/dislike) */
.agui-response-actions__btn--feedback.is-active {
    background-color: rgba(78, 11, 98, 0.1);
    color: var(--agui-purple);
}

.agui-response-actions__btn--feedback.is-active:hover {
    background-color: rgba(78, 11, 98, 0.15);
}

/* Download Dropdown */
.agui-response-actions__dropdown {
    position: relative;
}

.agui-response-actions__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 140px;
    padding: 6px 0;
    background-color: #fff;
    border: 1px solid rgba(19, 52, 59, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(19, 52, 59, 0.12);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}

.agui-response-actions__dropdown.is-open .agui-response-actions__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.agui-response-actions__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    font-family: var(--agui-font-primary);
    font-size: 13px;
    font-weight: 400;
    color: var(--agui-text-dark) !important;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.agui-response-actions__dropdown-item:hover {
    background-color: rgba(19, 52, 59, 0.04);
}

.agui-response-actions__dropdown-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: rgba(19, 52, 59, 0.5);
}

.agui-response-actions__dropdown-item span {
    flex: 1;
}

.agui-response-actions__dropdown-item.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ========================================
   Responsive Adjustments for Prompts Panel
   ======================================== */

@media (max-width: 1200px) {
    .agui-prompts-panel {
        width: 200px;
        right: 16px;
    }
}

@media (max-width: 1024px) {
    .agui-prompts-panel {
        display: none !important;
    }
}

/* ========================================
   Share Modal Styles
   ======================================== */

.agui-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: agui-modal-fade-in 0.2s ease;
}

.agui-share-modal.is-closing {
    animation: agui-modal-fade-out 0.2s ease forwards;
}

@keyframes agui-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes agui-modal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.agui-share-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 52, 59, 0.4);
}

.agui-share-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: calc(100% - 32px);
    box-shadow: 0 4px 24px rgba(19, 52, 59, 0.15);
    animation: agui-modal-slide-in 0.25s ease;
}

.agui-share-modal.is-closing .agui-share-modal__content {
    animation: agui-modal-slide-out 0.2s ease forwards;
}

@keyframes agui-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes agui-modal-slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.agui-share-modal__close-x {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--agui-text-dimmed);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
    padding: 0;
}

.agui-share-modal__close-x:hover {
    color: var(--agui-text-dark);
    background: rgba(19, 52, 59, 0.05);
}

.agui-share-modal__content h3 {
    margin: 0 0 4px;
    font-family: var(--agui-font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--agui-text-dark);
    line-height: normal;
}

.agui-share-modal__content p {
    margin: 0 0 16px;
    font-family: var(--agui-font-primary);
    font-size: 13px;
    color: var(--agui-text-dimmed);
}

.agui-share-modal__link-wrapper {
    display: flex;
    gap: 8px;
}

.agui-share-modal__link {
    flex: 1;
    padding: 10px !important;
    border: 1px solid var(--agui-border-soft);
    border-radius: 8px;
    font-family: var(--agui-font-primary);
    font-size: 13px;
    color: var(--agui-text-body);
    background: #fff;
    outline: none;
    min-width: 0;
    text-overflow: ellipsis;
}

.agui-share-modal__link:focus {
    border-color: var(--agui-teal);
}

.agui-share-modal__copy-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--agui-teal);
    color: #fff;
    font-family: var(--agui-font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.agui-share-modal__copy-btn:hover {
    background: #1a7a86;
}

.agui-share-modal__copy-btn.is-copied {
    background: #1a8754;
}

/* ========================================
   Notification Toast Styles
   ======================================== */

.agui-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 10px;
    background: var(--agui-text-dark);
    color: #fff;
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(19, 52, 59, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
}

.agui-notification--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.agui-notification--success {
    background: #1a8754;
}

.agui-notification--error {
    background: #dc3545;
}

.agui-notification--info {
    background: var(--agui-blue);
}


/* ========================================
   Feedback Popover Styles
   ======================================== */

.agui-feedback-popover {
    position: fixed;
    z-index: 10001;
    width: max-content;
    background: #f3f3ee;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 14px;
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Arrow pointing up */
.agui-feedback-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    z-index: 2;
    background: #f3f3ee;
    border-radius: 2px;
}

.agui-feedback-popover.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.agui-feedback-popover__header {
    margin-bottom: 10px;
}

.agui-feedback-popover__question {
    font-family: var(--agui-font-primary);
    font-size: 12px;
    font-weight: 500;
    color: var(--agui-text-dark);
    line-height: 1.4;
}

.agui-feedback-popover__close {
    display: none;
}

.agui-feedback-popover__options {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 10px;
}

.agui-feedback-popover__option {
    padding: 6px 10px;
    border: 1px solid rgba(19, 52, 59, 0.2);
    border-radius: 6px;
    background: transparent;
    color: var(--agui-text-dark);
    font-family: var(--agui-font-primary);
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agui-feedback-popover__option:hover {
    border-color: rgba(19, 52, 59, 0.4);
    background: rgba(19, 52, 59, 0.05);
}

.agui-feedback-popover__option.is-selected {
    background: rgba(19, 52, 59, 0.1);
    border-color: var(--agui-text-dark);
}

.agui-feedback-popover__textarea-wrap {
    display: none;
    margin-bottom: 10px;
}

.agui-feedback-popover__textarea-wrap.is-visible {
    display: block;
}

.agui-feedback-popover__textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(19, 52, 59, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--agui-text-dark);
    font-family: var(--agui-font-primary);
    font-size: 12px;
    resize: none;
    min-height: 50px;
    outline: none;
    transition: border-color 0.15s ease;
}

.agui-feedback-popover__textarea::placeholder {
    color: rgba(19, 52, 59, 0.4);
}

.agui-feedback-popover__textarea:focus {
    border-color: rgba(19, 52, 59, 0.4);
}

.agui-feedback-popover__actions {
    display: flex;
    justify-content: flex-end;
}

.agui-feedback-popover__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.agui-feedback-popover__remove {
    padding: 6px 14px;
    border: 1px solid rgba(19, 52, 59, 0.2);
    border-radius: 6px;
    background: transparent;
    color: var(--agui-text-dark);
    font-family: var(--agui-font-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agui-feedback-popover__remove:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.agui-feedback-popover__remove:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.agui-feedback-popover__submit {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: var(--agui-teal);
    color: #fff;
    font-family: var(--agui-font-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.agui-feedback-popover__submit:hover {
    background: #1a7a86;
}

.agui-feedback-popover__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Filter Dropdown Styles (Minimal)
   ======================================== */

.agui-tabs-bar__btn--filter {
    position: relative;
}

.agui-filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #f3f3ee;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--agui-border);
    min-width: 200px;
    max-width: 280px;
    z-index: 100;
    padding: 12px 0;
}

.agui-filter-dropdown__section {
    padding: 8px 16px;
    border-bottom: 1px solid var(--agui-border);
}

.agui-filter-dropdown__section:last-of-type {
    border-bottom: none;
}

.agui-filter-dropdown__label {
    font-family: var(--agui-font-primary);
    font-size: 11px;
    font-weight: 600;
    color: var(--agui-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.agui-filter-dropdown__row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agui-filter-dropdown__input{
    width: 100% !important;
    height: auto !important;
    padding: 4px 6px !important;
    border: 1px solid var(--agui-border-strong) !important;
    border-radius: 4px !important;
    font-family: var(--agui-font-primary) !important;
    font-size: 12px !important;
    color: var(--agui-text-dark) !important;
    background: #fff !important;
    text-align: center !important;
    -moz-appearance: textfield !important;
}

.agui-filter-dropdown__input::-webkit-outer-spin-button,
.agui-filter-dropdown__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.agui-filter-dropdown__input:focus {
    outline: none;
    border-color: var(--agui-teal);
}

.agui-filter-dropdown__sep {
    color: var(--agui-text-muted);
    font-size: 12px;
}

.agui-filter-dropdown__check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    font-family: var(--agui-font-primary);
    font-size: 13px;
    color: var(--agui-text-body);
}

.agui-filter-dropdown__check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border: 1px solid var(--agui-border-strong);
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.agui-filter-dropdown__check input[type="checkbox"]:checked {
    background: var(--agui-teal);
    border-color: var(--agui-teal);
}

.agui-filter-dropdown__check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.agui-filter-dropdown__check span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agui-filter-dropdown__footer {
    padding: 10px 16px 4px;
    border-top: 1px solid var(--agui-border);
    margin-top: 4px;
}

.agui-filter-dropdown__clear {
    display: block;
    width: 100%;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid var(--agui-border-strong);
    border-radius: 5px;
    font-family: var(--agui-font-primary);
    font-size: 12px;
    font-weight: 500;
    color: var(--agui-text-body);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.agui-filter-dropdown__clear:hover {
    background: #eee;
    border-color: var(--agui-teal);
    color: var(--agui-teal);
}

/* Product slider item filtered state */
.agui-products-slider__item.is-filtered-out {
    display: none !important;
}

/* ========================================
   Lightbox Styles
   ======================================== */
body.lightbox-open {
    overflow: hidden;
}

.agui-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.agui-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.agui-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.agui-lightbox__content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 90vh;
}

.agui-lightbox__images {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.agui-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 4px;
}

.agui-lightbox__img.is-active {
    display: block;
}

.agui-lightbox__prev,
.agui-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

.agui-lightbox__prev {
    left: 0;
}

.agui-lightbox__next {
    right: 0;
}

.agui-lightbox__prev:hover,
.agui-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.agui-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--agui-font-primary);
    font-size: 14px;
    font-weight: 500;
}