/* ============================================================
   Hikes Beta - List page styles (v84)
   Uses tokens from styles.css:
     --primary-color: #5a99c5, --secondary-color: #779974
     --bg-light: #fbf9f5, --card-title-color: #1a3060
     --accent-color: #ff6b35
   ============================================================ */

/* Beta badge in header */
.beta-badge {
    background: #ff6b35;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.main-content { padding: 0; }

/* ============================================================
   Inline filter bar at top of list page
   ============================================================ */
.filter-bar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    max-width: 800px;
    margin: 0 auto;
}

.fb-collapse {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: none;
    border-bottom: 1px solid #f0eee5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1a3060;
    font-weight: 600;
}
.fb-collapse-label { flex: 1; text-align: left; }
.fb-active-count {
    background: #5a99c5;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-right: 0.5rem;
}
.fb-chevron {
    color: #888;
    font-size: 0.9rem;
    transition: transform 0.2s;
}
.fb-collapse.collapsed .fb-chevron { transform: rotate(-90deg); }

.fb-body {
    padding: 0.75rem 1rem 1rem;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.25s ease-out, padding 0.25s ease-out;
}
.fb-body.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.fb-section { margin-bottom: 1rem; }
.fb-section:last-of-type { margin-bottom: 0.5rem; }
.fb-section h3 {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.fb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.fb-chip {
    padding: 0.35rem 0.8rem;
    border-radius: 16px;
    border: 1.5px solid #dee2e6;
    font-size: 0.8rem;
    color: #5f5e5a;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}
.fb-chip:hover { border-color: #5a99c5; }
.fb-chip.on {
    background: #5a99c5;
    color: #fff;
    border-color: #5a99c5;
}

/* Toggle rows in Options section */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7f5ee;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label {
    font-size: 0.85rem;
    color: #2c3e50;
}

.toggle {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #dee2e6;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    flex-shrink: 0;
    border: none;
    padding: 0;
}
.toggle.on { background: #779974; }
.toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.2s;
}
.toggle.on::after { transform: translateX(18px); }

.fb-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}
.fb-reset {
    background: none;
    border: none;
    color: #5a99c5;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    padding: 0.35rem 0;
    text-decoration: underline;
}
.fb-reset:hover { color: #1a3060; }

/* ============================================================
   Results bar
   ============================================================ */
.results-bar {
    padding: 0.5rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    max-width: 800px;
    margin: 0 auto;
    position: sticky;
    top: 0;
    z-index: 40;
}
.results-count { font-size: 0.8rem; color: #5f5e5a; }
.sort-select {
    font-size: 0.8rem;
    color: #5f5e5a;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.loading, .error {
    padding: 2rem;
    text-align: center;
    color: #5f5e5a;
}
.error { color: #dc3545; }
.hidden { display: none; }

/* ============================================================
   Cards
   ============================================================ */
.cards {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}
@media (min-width: 720px) {
    .cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.card:hover, .card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.card.featured { border-color: #779974; }

.card-img-wrap {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #c0dd97, #779974);
}
.card-img-wrap.section-south { background: linear-gradient(135deg, #f5c4b3, #ff6b35); }
.card-img-wrap.section-interior { background: linear-gradient(135deg, #b5d4f4, #5a99c5); }
.card-img-wrap.section-east { background: linear-gradient(135deg, #e4d5b3, #bba478); }
.card-img-wrap.section-west { background: linear-gradient(135deg, #d4c3e0, #8b7fa8); }

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    position: absolute;
    border-radius: 10px;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    z-index: 1;
}
.badge-featured { top: 0.5rem; left: 0.5rem; background: #779974; color: #fff; }
.badge-family { top: 0.5rem; right: 0.5rem; background: rgba(255,255,255,0.95); color: #3b6d11; border: 1px solid #b4ce9a; }
.badge-popular { bottom: 0.5rem; left: 0.5rem; background: rgba(26,48,96,0.85); color: #fff; }

.card-body { padding: 0.75rem 0.9rem 0.85rem; }
.card-section {
    font-size: 0.65rem;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a3060;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.card-stats {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    align-items: center;
}
.stat {
    font-size: 0.75rem;
    color: #5f5e5a;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.diff-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.diff-easy      { background: #d4edda; color: #155724; }
.diff-easy-mod  { background: #e8ecc7; color: #4d5a1e; }
.diff-mod       { background: #fff3cd; color: #856404; }
.diff-mod-str   { background: #fde3cc; color: #8a4b0c; }
.diff-str       { background: #f8d7da; color: #721c24; }
.diff-very-str  { background: #e8b5b8; color: #4d0e14; }

.card-desc {
    font-size: 0.8rem;
    color: #5f5e5a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #5f5e5a;
    background: #fff;
    border-radius: 12px;
}
