/* =============================================================================
   product-autocomplete.css — "שם המוצר" autocomplete dropdown
   Shared by primeimports.co.il (index.php) and the TWA app (order.html).
   ========================================================================= */

.pname-ac-wrap {
    position: relative;
}

.pname-ac-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(30, 136, 229, 0.14);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(16, 35, 63, 0.16), 0 2px 8px rgba(16, 35, 63, 0.08);
    transform-origin: top center;
    animation: pnameAcIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: right;
    direction: rtl;
}

.pname-ac-list--closing {
    animation: pnameAcOut 0.13s ease forwards;
}

[dir="ltr"] .pname-ac-list {
    text-align: left;
    direction: ltr;
}

@keyframes pnameAcIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pnameAcOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

.pname-ac-list::-webkit-scrollbar {
    width: 5px;
}
.pname-ac-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

.pname-ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.14s ease, transform 0.14s ease;
    animation: pnameItemIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 25ms);
}

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

.pname-ac-item + .pname-ac-item {
    margin-top: 2px;
}

.pname-ac-icon {
    flex: none;
    width: 18px;
    text-align: center;
    font-size: 0.82rem;
    color: #c3ccd4;
    transition: color 0.14s ease;
}

.pname-ac-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pname-ac-item:hover,
.pname-ac-item.is-active {
    background: #f0f8ff;
    transform: translateX(-2px);
}

[dir="ltr"] .pname-ac-item:hover,
[dir="ltr"] .pname-ac-item.is-active {
    transform: translateX(2px);
}

.pname-ac-item:hover .pname-ac-icon,
.pname-ac-item.is-active .pname-ac-icon {
    color: #1e88e5;
}

.pname-ac-item mark {
    background: transparent;
    color: #1565c0;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .pname-ac-list,
    .pname-ac-list--closing,
    .pname-ac-item {
        animation: none;
    }
    .pname-ac-item:hover,
    .pname-ac-item.is-active {
        transform: none;
    }
}

@media (max-width: 480px) {
    .pname-ac-list { max-height: 240px; }
    .pname-ac-item { padding: 10px 12px; font-size: 0.9rem; }
}
