/* AEM Labs VectorFind - Builder */
/* ============================= */

.page-content {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 85%;
    margin: 0 auto 60px;
}

.faq-section {
    padding: 30px 0 60px !important;
}

.chat-window {
    width: 35%;
}

.builder-window {
    width: 65%;
    height: fit-content;
    position: relative;
    overflow: hidden;
}

.scroll-region {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.scroll-region::-webkit-scrollbar {
    width: 8px;
}

.scroll-region::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-region::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.scroll-region::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.add-ons {
    width: calc(100% + 12px) !important;
}


.component-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.component-item {
    margin: 0;
    padding: 0;
    width: 100%;
    background: white;
    color: #222;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px 8px 8px;
    transition: all 0.2s ease;
}

.component-item:hover {
    border: 1px solid var(--accent-color);
    background: rgba(var(--accent-color-rgb), 0.05);
}

.item-lhs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.component-image {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: rgb(238, 236, 236);
    display: flex;
    align-items: center;
    justify-content: center;
}

.component-image i {
    font-size: 24px;
    color: #999;
}

.component-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.component-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    border-radius: 12px;
}

.component-image .image-overlay i {
    color: white;
    font-size: 14px;
}

.component-image:hover .image-overlay {
    opacity: 1;
    visibility: visible;
}

.component-image:hover img {
    transform: scale(1.05);
}

.component-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.component-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.component-title:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.component-meta {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
}

.component-meta .current-price {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 15px;
}

.component-meta .original-price {
    font-size: 11px;
    text-decoration: line-through;
    font-weight: 600;
    color: #666;
}

.component-meta .seller-name {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.component-meta .seller-name i {
    color: var(--accent-color);
    pointer-events: none;
    text-decoration: none !important;
}

.component-meta .seller-name:hover span {
    color: var(--accent-color);
    text-decoration: underline !important;
}

.component-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row-reverse;
    gap: 8px;
    flex-shrink: 0;
}

.component-actions button {
    font-size: 12px;
    font-weight: 600;
    color: white;
    border: none;
    transition: all 0.2s ease;
    padding: 6px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 6px;
}

.component-actions button:nth-of-type(1) {
    background: linear-gradient(270deg, #a71c1c, #6907c5, #a71c1c, #6907c5);
    background-size: 300% 100%;
    background-position: 0% 0%;
}

.component-actions button:nth-of-type(1):hover:not(:disabled) {
    background-position: 100% 0%;
    box-shadow: 0 4px 12px rgba(167, 28, 28, 0.3);
}

.component-actions button:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
}

.component-actions button:nth-of-type(2) {
    background: #666;
    padding: 4px 5px;
    border-radius: 50%;
}

.component-actions button:nth-of-type(2) i {
    font-size: 8px;
}

.component-actions button:nth-of-type(2):hover {
    background-position: 100% 0%;
    box-shadow: 0 4px 12px rgba(240, 240, 240, 0.3);
}

/* Unselected Component */
.component-item.unselected {
    background: #fafafa;
    border: 2px dashed #d0d0d0;
    opacity: 0.7;
}

.component-item.unselected:hover {
    border-color: var(--accent-color);
    opacity: 1;
    background: rgba(var(--accent-color-rgb), 0.03);
}

.component-item.unselected .component-image {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.component-item.unselected .component-image i {
    font-size: 24px;
    color: #999;
}

.component-item.unselected .component-title {
    color: #999;
    font-weight: 600;
    cursor: default;
}

.component-item.unselected .component-title:hover {
    color: #999;
    text-decoration: none;
}

.component-item.unselected .unselected-text {
    font-size: 11px;
    font-weight: 500;
    color: #bbb;
    font-style: italic;
}

.component-item.unselected .component-actions button {
    background: var(--accent-color);
    padding: 6px 12px;
}

.component-item.unselected .component-actions button:hover {
    background: var(--accent-color);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.3);
}


/* AI Suggestions */


.add-ons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 0 12px;
}

.add-ons .product-card {
    width: 100%;
    max-width: 125px;
    display: flex;
    flex-direction: column;
}

.add-ons .product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background-color: rgb(238, 236, 236);
    border-radius: 16px;
}

.add-ons .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.add-ons .badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.add-ons .badge.discount {
    background: linear-gradient(135deg, var(--accent-color) 0%, #6907c5 100%);
    color: white;
}

.add-ons .badge.new {
    background: #00b894;
    color: white;
    width: fit-content;
}

.add-ons .badge.out-of-stock {
    background: #ff4444;
    color: white;
}

.add-ons .product-title-link {
    text-decoration: none;
    color: inherit;
}

.add-ons .product-card:hover .product-image img {
    transform: scale(1.02);
}

.add-ons .product-details {
    padding: 12px 0 0;
    position: relative;
}

.add-ons .product-title {
    font-size: 12px;
    margin: 0 0 4px 0;
    color: #333;
    line-height: 1.4;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.add-ons .product-link:hover,
.add-ons .product-seller:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.add-ons .product-link {
    text-decoration: none;
    color: #333;
}

.add-ons .product-price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 14px;
}

.add-ons .product-seller {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

.add-ons .add-product {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: white;
    color: #222;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    width: 26px;
    height: 26px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease, background-position 0.6s ease;
    z-index: 2;
}

.add-ons .add-product:hover {
    transform: scale(1.1);
}

.add-ons .product-card.empty i {
    font-size: 42px;
    color: #999;
}

.add-ons .product-card.empty .product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d0d0d0;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.add-ons .product-card.empty:hover .product-image {
    border: 2px dashed var(--accent-color);
    opacity: 1;
}

.add-ons .product-card.empty .product-link:hover {
    text-decoration: none;
    cursor: default;
}