/* ============================================================
   ComBack - App Cliente (userapp) - CSS de la pagina 'search'
   Externalizado desde search.html (extra_css). Cache-busted con ?v=asset_version.
   ============================================================ */

.search-page {
        padding: 16px 16px 80px;
        max-width: 720px;
        margin: 0 auto;
    }
    @media (max-width: 480px) {
        .search-page { padding: 12px 14px 80px; }
    }
    .search-header {
        background: linear-gradient(135deg, var(--header-gradient-start, var(--cb-support)) 0%, var(--header-gradient-end, #5852EB) 100%);
        color: #fff;
        padding: 24px 20px 20px;
        border-radius: 16px;
        margin-bottom: 16px;
        box-shadow: var(--shadow-sm);
    }
    .search-header h1 {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0 0 4px;
    }
    .search-header p {
        font-size: 0.85rem;
        opacity: 0.9;
        margin: 0 0 16px;
    }
    .search-input-wrap {
        position: relative;
    }
    .search-input-wrap i {
        position: absolute;
        top: 50%;
        left: 14px;
        transform: translateY(-50%);
        color: rgba(255,255,255,0.7);
    }
    .search-input {
        width: 100%;
        padding: 12px 14px 12px 40px;
        border-radius: 12px;
        border: none;
        background: rgba(255,255,255,0.18);
        color: #fff;
        font-size: 0.95rem;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .search-input::placeholder { color: rgba(255,255,255,0.65); }
    .search-input:focus {
        outline: 2px solid rgba(255,255,255,0.4);
        background: rgba(255,255,255,0.25);
    }

    .type-chips {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 4px 2px 12px;
        scrollbar-width: none;
    }
    .type-chips::-webkit-scrollbar { display: none; }
    .type-chip {
        flex-shrink: 0;
        padding: 7px 16px;
        border-radius: 20px;
        background: var(--card-bg, #fff);
        border: 1.5px solid var(--border-color, #e0e0e0);
        color: var(--text-secondary, #666);
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.2s;
    }
    .type-chip.active,
    .type-chip:hover {
        background: linear-gradient(135deg, var(--cb-magenta) 0%, var(--cb-magenta-dark) 50%, #9C27B0 100%);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 4px 12px rgba(216,27,96,0.3);
    }

    .results-info {
        font-size: 0.78rem;
        color: var(--text-secondary, #888);
        margin: 8px 4px 12px;
    }

    .merchant-card {
        background: var(--card-bg, #fff);
        border-radius: 14px;
        padding: 14px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        color: inherit;
        box-shadow: var(--shadow-sm);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .merchant-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
        text-decoration: none;
        color: inherit;
    }
    .merchant-logo {
        width: 56px; height: 56px;
        border-radius: 50%;
        overflow: hidden;
        background: linear-gradient(135deg, var(--cb-support), #5852EB);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .merchant-logo img {
        width: 100%; height: 100%; object-fit: cover;
    }
    .merchant-logo span {
        color: #fff;
        font-weight: 800;
        font-size: 1.4rem;
    }
    .merchant-info {
        flex: 1;
        min-width: 0;
    }
    .merchant-name {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text-primary, #2D2D2D);
        margin: 0 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .merchant-type {
        font-size: 0.75rem;
        color: var(--text-tertiary, #888);
        font-weight: 500;
    }
    .merchant-arrow {
        font-size: 0.85rem;
        color: var(--text-tertiary, #aaa);
        flex-shrink: 0;
    }
    /* T-QR: pill de % de cashback (rellenado por JS desde el cache del dispositivo) */
    .search-cb-badge {
        display: none;
        align-items: center;
        gap: 4px;
        padding: 4px 9px;
        border-radius: 999px;
        background: linear-gradient(135deg, #28a745 55%, #5dca7c 100%);
        color: #fff;
        font-size: 0.76rem;
        font-weight: 800;
        line-height: 1;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .search-cb-badge.is-shown { display: inline-flex; }
    .search-cb-badge i { font-size: 0.7rem; opacity: 0.9; }

    .empty-state {
        text-align: center;
        padding: 40px 20px;
        color: var(--text-tertiary, #888);
    }
    .empty-state i {
        font-size: 3rem;
        opacity: 0.3;
        margin-bottom: 12px;
        display: block;
    }
    .empty-state p {
        font-size: 0.88rem;
        margin: 0;
    }
