/* Made by Claude — Shared styles for swipe-card pages (Races, Events) */

/* ── Page container ── */
.swipe-page {
    padding: 0.5rem;
}

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.6rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1565C0;
    margin: 0;
}

/* ── Filter tabs ── */
.filter-tabs {
    display: flex;
    gap: 0.4rem;
}

.tab {
    padding: 0.3rem 0.9rem;
    border-radius: 1rem;
    border: 1.5px solid #1565C0;
    background: transparent;
    color: #1565C0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.tab--active {
    background: #1565C0;
    color: #fff;
}

/* ── Loading / empty states ── */
.page-loading,
.page-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #888;
}

.page-empty small {
    font-size: 0.82rem;
    color: #aaa;
    display: block;
    margin-top: 0.4rem;
}

/* ── List container ── */
.swipe-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ── Row wrapper — positions swipe-bg behind card, shadow visible outside overflow:hidden ── */
.swipe-row-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ── Swipe background reveal ── */
.swipe-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    border-radius: 8px;
    background: transparent;
    transition: background 0.1s;
}

.swipe-bg--right { background: #1565C0; }
.swipe-bg--left  { background: #e53935; }

.swipe-hint {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transition: opacity 0.1s;
}

.swipe-bg--right .swipe-hint--right { opacity: 1; }
.swipe-bg--left  .swipe-hint--left  { opacity: 1; }

/* ── Card (foreground) ── */
.swipe-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff;
    touch-action: pan-y;
    user-select: none;
    border-left: 4px solid transparent;
    transition: border-color 0.2s;
}

/* Tagged state */
.swipe-card--tagged {
    border: 2px solid #1565C0;
    border-left: 6px solid #1565C0;
    background-color: #dbeafe !important;
    color: #1a1a2e !important;
}

/* ── CSS-only bookmark pin ── */
.tag-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 18px;
    background: #1565C0;
    position: relative;
    border-radius: 2px 2px 0 0;
}

.tag-icon::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 7px solid #1565C0;
    border-right: 7px solid #1565C0;
    border-bottom: 7px solid transparent;
}

/* ── Tag chips ── */
.tag-chips {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.tag-chip {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Race card internals ── */
.race-number {
    font-size: 1.8rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
    flex: 0 0 auto;
}

.race-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.race-title-text {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

/* Made by Claude — 3-col grid keeps distance centred regardless of chip presence */
.race-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 0.82rem;
}

.race-meta .tag-chips {
    justify-self: end;
    margin-left: 0;
}

/* ── Event card internals ── */
.event-label {
    font-size: 1.8rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
    flex: 0 0 auto;
}

.event-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-name {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}
