/**
 * HTBK Product Finder & Survey Scoped Styles
 * 1:1 Parity with React Tailwind/Shadcn UI
 */

.htbk-finder-page {
    /* Scoped container styling */
    width: 100%;
}

.htbk-finder-page .finder-option-btn {
    user-select: none;
    outline: none;
}

.htbk-finder-page .finder-option-btn:focus-visible {
    box-shadow: 0 0 0 2px hsl(var(--primary));
}

.htbk-finder-page .finder-model-btn {
    min-height: 72px;
}

.htbk-finder-page .finder-model-btn svg {
    transition: transform 0.15s ease, color 0.15s ease;
}

.htbk-finder-page .finder-model-btn:hover svg {
    transform: scale(1.08);
}

.htbk-finder-page .finder-model-btn.active svg {
    color: hsl(var(--primary));
}

.htbk-finder-page .finder-model-btn:not(.active) svg {
    color: hsl(var(--muted-foreground));
}

/* Transitions for Product Cards in Results Grid */
.htbk-finder-page .finder-product-item-wrap,
.htbk-finder-page .segment-product-item-wrap {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.htbk-finder-page .finder-product-item-wrap.hidden,
.htbk-finder-page .segment-product-item-wrap.hidden {
    display: none !important;
}

/* Active tab state for restaurant tabs */
.htbk-finder-page .restaurant-tab-btn.active {
    border-color: hsl(var(--primary));
    background-color: hsl(var(--accent));
    color: hsl(var(--primary));
    font-weight: 600;
}

/* Scoped styles for Product Cards and "+ Thêm vào danh sách" CTA on mobile in /tim-hang-phu-hop/ */
@media (max-width: 639.98px) {
    .htbk-finder-page #finder-products-grid,
    .htbk-finder-page .finder-products-grid {
        gap: 12px;
    }

    .htbk-finder-page .finder-product-item-wrap article > div:last-child {
        padding: 10px 10px 12px;
    }

    .htbk-finder-page .finder-product-item-wrap button[data-quote-slug],
    .htbk-finder-page .finder-product-item-wrap .product-card-cta,
    .htbk-finder-page #finder-products-grid button {
        height: 34px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        gap: 3.5px !important;
        border-radius: 7px !important;
        letter-spacing: -0.015em !important;
        width: calc(100% - 6px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        box-shadow: 0 1px 2px rgba(22, 167, 224, 0.15) !important;
    }

    .htbk-finder-page .finder-product-item-wrap button[data-quote-slug] svg,
    .htbk-finder-page .finder-product-item-wrap .product-card-cta svg,
    .htbk-finder-page #finder-products-grid button svg {
        width: 13px !important;
        height: 13px !important;
        min-width: 13px !important;
        min-height: 13px !important;
        margin-right: 0 !important;
    }

    .htbk-finder-page .finder-product-item-wrap button[data-quote-slug] span,
    .htbk-finder-page .finder-product-item-wrap .product-card-cta span,
    .htbk-finder-page #finder-products-grid button span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }
}
