/*
 * Product Lookup — Web Result Card
 *
 * Styles for web search result cards rendered inside the product grid.
 * Inherits all existing .wishly-product-card styles and only adds the
 * small differences needed to distinguish a web result from a catalog product.
 *
 * All new selectors are prefixed with .wishly-product-card--web-result
 * or .wlk- to stay isolated from existing components.
 */

/* ── Web image area ─────────────────────────────────────────────── */
.wishly-product-card__image--web {
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.08) 0%,
        rgba(59, 130, 246, 0.08) 100%
    );
}

.wishly-product-card__image--web img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── "via Wikipedia / DuckDuckGo" tag ──────────────────────────── */
.wlk-source-tag {
    position: absolute;
    bottom: var(--w-space-2);
    left: var(--w-space-2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.35);
    padding: 2px 6px;
    border-radius: var(--w-radius-full);
    pointer-events: none;
}

/* ── Web badge ──────────────────────────────────────────────────── */
.wishly-badge--web {
    background: rgba(99, 102, 241, 0.18);
    color: rgb(165, 180, 252);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .wishly-badge--web {
    background: rgba(99, 102, 241, 0.1);
    color: rgb(79, 70, 229);
    border-color: rgba(99, 102, 241, 0.25);
}

/* ── Footer row ─────────────────────────────────────────────────── */
.wlk-footer {
    justify-content: flex-start;
}

.wlk-not-in-catalog {
    font-size: var(--w-text-xs);
    color: var(--w-text-tertiary);
    font-style: italic;
}

/* ── Request button — same size as the cart button ─────────────── */
.wlk-request-btn {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #fff;
    font-weight: 600;
    font-size: var(--w-text-sm);
    padding: var(--w-space-2) var(--w-space-3);
    border-radius: var(--w-radius-lg);
    transition: opacity 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    border: none;
}

.wlk-request-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* ── Not-found variant — slightly muted ─────────────────────────── */
.wishly-product-card--not-found {
    opacity: 0.85;
}

/* ── Skeleton inside card ───────────────────────────────────────── */
.wishly-product-card--web-skeleton {
    pointer-events: none;
}

.wlk-skeleton-badge {
    height: 18px;
    width: 70px;
    border-radius: var(--w-radius-full);
    margin-bottom: var(--w-space-2);
}

.wlk-skeleton-title {
    height: 20px;
    width: 80%;
    border-radius: var(--w-radius-md);
    margin-bottom: var(--w-space-3);
}

.wlk-skeleton-text {
    height: 13px;
    width: 100%;
    border-radius: var(--w-radius-md);
    margin-bottom: var(--w-space-2);
}

.wlk-skeleton-text--short {
    width: 65%;
}

/* ── Fade-in animation for the card ────────────────────────────── */
.wishly-product-card--web-result {
    animation: wlk-card-in 0.3s ease both;
}

@keyframes wlk-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Done state (after successful wish) ─────────────────────────── */
.wlk-wish-btn--done {
    background: rgba(34, 197, 94, 0.15) !important;
    color: rgb(74, 222, 128) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    cursor: default !important;
}

[data-theme="light"] .wlk-wish-btn--done {
    background: rgba(34, 197, 94, 0.1) !important;
    color: rgb(22, 163, 74) !important;
    border-color: rgba(34, 197, 94, 0.25) !important;
}

/* ── Guest inline form ───────────────────────────────────────────── */
.wlk-guest-form {
    display: flex;
    flex-direction: column;
    gap: var(--w-space-2);
    padding: var(--w-space-3);
    animation: wlk-card-in 0.2s ease both;
}

.wlk-guest-form__fields {
    display: flex;
    gap: var(--w-space-2);
}

.wlk-guest-input {
    flex: 1;
    min-width: 0;
    font-size: var(--w-text-sm) !important;
    padding: var(--w-space-2) var(--w-space-3) !important;
}

.wlk-input--error {
    border-color: var(--w-color-error, #ef4444) !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.15) !important;
}

.wlk-guest-note {
    font-size: var(--w-text-xs);
    color: var(--w-text-tertiary);
    margin: 0;
    text-align: center;
}

@media (max-width: 640px) {
    .wlk-guest-form__fields {
        flex-direction: column;
    }
}
