/* ── ForYouFeed — "For You" recommendations grid ─────────────────────────── */

.foryou-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    padding: 0.75rem 0;
}

@media (max-width: 1024px) {
    .foryou-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .foryou-grid { grid-template-columns: 1fr; }
}

/* ── Recommendation card ────────────────────────────────────────────────── */

.rec-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rec-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ── Hero image area ────────────────────────────────────────────────────── */

.rec-card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a2535;
}

.rec-card-img canvas.card-blurhash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.rec-card-img canvas.card-blurhash.faded {
    opacity: 0;
}

.rec-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.rec-card-img img.loaded {
    opacity: 1;
}

/* ── Match score badge ──────────────────────────────────────────────────── */

.rec-match-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

/* ── Action buttons (save + skip) ──────────────────────────────────────── */

.rec-card-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.rec-card-actions .card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 35, 0.65);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.rec-card-actions .card-action-btn:hover {
    background: rgba(224, 90, 43, 0.85);
    color: #fff;
}

.rec-card-actions .card-action-btn.saved {
    background: rgba(224, 90, 43, 0.9);
    color: #fff;
}

/* "Not for me" button: hidden until card hovered */
.rec-skip-btn {
    opacity: 0;
    transition: opacity 0.2s, background 0.15s !important;
}

.rec-card:hover .rec-skip-btn {
    opacity: 1;
}

/* ── Card body ──────────────────────────────────────────────────────────── */

.rec-card-body {
    padding: 10px 12px 12px;
}

.rec-card-body .card-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-card-body .card-location {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Reason chip ────────────────────────────────────────────────────────── */

.rec-reason-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 2px 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Loading indicator ──────────────────────────────────────────────────── */

.foryou-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.foryou-loading.hidden { display: none; }

/* ── End message ────────────────────────────────────────────────────────── */

.foryou-end-msg {
    text-align: center;
    padding: 20px 0 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

.foryou-end-msg.hidden { display: none; }

/* ── Login nudge ────────────────────────────────────────────────────────── */

.foryou-login-nudge {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.foryou-login-nudge a {
    color: #E05A2B;
    text-decoration: none;
}

.foryou-login-nudge a:hover {
    text-decoration: underline;
}
