/* ============================================
   /scan — PDX Lead Board ("No Website" Tab)
   Sales opportunity board for web developers
   ============================================ */

/* ── Tab Bar ── */
.scan-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
.scan-tab {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    position: relative;
    top: 1px;
}
.scan-tab:hover {
    color: var(--text-light);
}
.scan-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: 4px 4px 0 0;
}
.scan-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.scan-tab-count {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    vertical-align: middle;
}
.scan-tab.active .scan-tab-count {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
}

/* ── PDX Hero (Sales intro for the tab) ── */
.pdx-hero {
    text-align: center;
    padding: 2.5rem 0 1rem;
}
.pdx-hero h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 0.75rem;
}
.pdx-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.pdx-hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.6rem 1.5rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}
.pdx-hero-highlight .pdx-hero-num {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
}

/* ── PDX Stats Grid ── */
.pdx-stats-section {
    padding: 0 0 2rem;
}
.pdx-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.pdx-stats-grid .stat-card {
    position: relative;
    overflow: hidden;
}
.pdx-stats-grid .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.pdx-stats-grid .stat-card:hover::before {
    opacity: 1;
}
.pdx-stat-icon {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    display: block;
}

/* ── PDX Filter Bar ── */
.pdx-filters {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 70px;
    z-index: 10;
}
.pdx-filters .showcase-search {
    flex: 1;
    min-width: 180px;
}
.pdx-filters .showcase-sort {
    min-width: 140px;
}

/* Revenue pill filters */
.pdx-revenue-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.pdx-revenue-pill {
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--font-body);
}
.pdx-revenue-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pdx-revenue-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #0A0A0A;
}

/* ── PDX Card Grid ── */
.pdx-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ── PDX Business Card — Opportunity style ── */
.pdx-card {
    display: flex;
    flex-direction: column;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-left: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(12px);
    animation: cardFadeIn 0.4s ease forwards;
    position: relative;
}
.pdx-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    border-left-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
}

/* High-value card accent */
.pdx-card[data-revenue="high"] {
    border-left-color: var(--color-success);
}
.pdx-card[data-revenue="high"]:hover {
    border-left-color: #66BB6A;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1);
}

/* Card header: status + revenue badges */
.pdx-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

/* Status badge — opportunity framing */
.pdx-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.pdx-status-badge--no-website {
    background: rgba(33, 150, 243, 0.12);
    color: var(--color-info);
    border: 1px solid rgba(33, 150, 243, 0.25);
}
.pdx-status-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-info);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Revenue badge — the key signal */
.pdx-revenue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.pdx-revenue-high {
    background: rgba(76, 175, 80, 0.15);
    color: #66BB6A;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.pdx-revenue-medium {
    background: rgba(255, 183, 77, 0.12);
    color: var(--color-warning);
    border: 1px solid rgba(255, 183, 77, 0.25);
}
.pdx-revenue-low {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.pdx-revenue-icon {
    font-size: 0.75rem;
}

/* Business name — hero of the card */
.pdx-card-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: var(--text-light);
    line-height: 1.3;
}

/* Category + neighborhood line */
.pdx-card-category {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.pdx-card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

/* Contact info row */
.pdx-card-contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    margin-bottom: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Phone link — prominent but not dominant */
.pdx-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
.pdx-phone-link:hover {
    color: #e8c84a;
}
.pdx-phone-icon {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Address */
.pdx-card-address {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card footer action — button style CTA */
.pdx-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.55rem 1rem;
    margin-top: auto;
    font-family: var(--font-body);
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}
.pdx-card-action:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    color: #e8c84a;
}
.pdx-card-action::after {
    content: '\2192';
    transition: transform 0.2s;
}
.pdx-card:hover .pdx-card-action::after {
    transform: translateX(4px);
}

/* ── PDX Result Count ── */
.pdx-result-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: auto;
}

/* ── Load More ── */
.pdx-load-more {
    text-align: center;
    margin: 2rem 0;
}

/* ── Empty State ── */
.pdx-empty {
    text-align: center;
    padding: 3rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    grid-column: 1 / -1;
}
.pdx-empty p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ── Skeleton Loading ── */
.pdx-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 14px;
    border-left: 3px solid rgba(212, 175, 55, 0.15);
    height: 200px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Spinner Loading (fallback) ── */
.pdx-loading {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}
.pdx-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Revenue Distribution Mini Chart ── */
.pdx-revenue-dist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
}
.pdx-rev-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pdx-rev-label {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}
.pdx-rev-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}
.pdx-rev-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 2px;
}
.pdx-rev-count {
    width: 32px;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: right;
    font-family: var(--font-heading);
}

/* ── Responsive ── */
@media (max-width: 968px) {
    .pdx-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pdx-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .scan-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 640px) {
    .pdx-hero {
        padding: 1.5rem 0 0.5rem;
    }
    .pdx-hero h2 {
        font-size: 1.6rem;
    }
    .pdx-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .pdx-grid {
        grid-template-columns: 1fr;
    }
    .pdx-filters {
        flex-direction: column;
        align-items: stretch;
        position: static;
    }
    .pdx-filters .showcase-search {
        min-width: unset;
    }
    .pdx-result-count {
        margin-left: 0;
        text-align: center;
    }
    .scan-tabs {
        padding: 0 0.5rem;
    }
    .scan-tab {
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
    }
    .pdx-card-contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .pdx-status-badge-dot,
    .pdx-skeleton,
    .pdx-loading-spinner,
    .pdx-card,
    .scan-tab,
    .pdx-revenue-pill,
    .pdx-card-action,
    .pdx-card-action::after,
    .pdx-rev-bar,
    .pdx-stats-grid .stat-card::before {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
