/* Bicycle search page: MatMak's layout in the HPL colours (css/hpl/tokens.css) */
.bicycle-subtitle {
    font-size: 1.1rem;
    color: var(--hpl-text);
    margin-bottom: 1.5rem;
}

.bicycle-filters {
    background: var(--hpl-grey-50);
    border: 1px solid var(--hpl-border);
    border-radius: var(--hpl-radius-card);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.bicycle-search {
    position: relative;
    margin-bottom: 1rem;
}

.bicycle-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hpl-muted);
}

.bicycle-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--hpl-grey-300);
    border-radius: var(--hpl-radius);
    font-size: 1rem;
}

.bicycle-search input:focus,
.bicycle-filters .form-select:focus {
    outline: none;
    border-color: var(--hpl-red);
    box-shadow: var(--hpl-focus-ring);
}

.bicycle-filters .form-label {
    font-weight: var(--hpl-weight-semibold);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.bicycle-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    min-height: 2rem;
}

.bicycle-count {
    font-weight: var(--hpl-weight-semibold);
    color: var(--hpl-text);
}

.bicycle-filter-actions .btn-link {
    color: var(--hpl-red);
    text-decoration: none;
    padding: 0;
}

.bicycle-filter-actions .btn-link:hover,
.bicycle-filter-actions .btn-link:focus {
    color: var(--hpl-red-dark);
}

.bicycle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.bicycle-card {
    border: 1px solid var(--hpl-border);
    border-radius: var(--hpl-radius-card);
    overflow: hidden;
    background: var(--hpl-white);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.bicycle-card:hover {
    box-shadow: var(--hpl-shadow-sm);
}

.bicycle-card-image {
    background: var(--hpl-grey-50);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bicycle-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bicycle-card-no-image {
    font-size: 3rem;
    color: var(--hpl-grey-400);
}

/* frame kit preview on hover / tap */
.bicycle-card-image.has-frame {
    position: relative;
    cursor: pointer;
}

.bicycle-card-image.has-frame:focus-visible {
    outline: 3px solid rgba(var(--hpl-red-rgb), 0.5);
    outline-offset: -3px;
}

.bicycle-frame-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--hpl-white);
    color: var(--hpl-red);
    border: 1px solid rgba(var(--hpl-red-rgb), 0.4);
    border-radius: var(--hpl-radius-pill);
    padding: 0.1rem 0.6rem;
    font-size: 0.75rem;
    font-weight: var(--hpl-weight-semibold);
}

.bicycle-card-image.show-frame .bicycle-frame-badge {
    background: var(--hpl-red);
    color: var(--hpl-white);
}

.bicycle-card-title {
    font-size: 1.1rem;
    font-weight: var(--hpl-weight-bold);
    color: var(--hpl-dark);
    margin: 0;
}

.bicycle-card-tags {
    display: flex;
    gap: 0.4rem;
    margin: 0.75rem 0;
}

.bicycle-tag {
    background: rgba(var(--hpl-red-rgb), 0.08);
    color: var(--hpl-red-dark);
    border-radius: var(--hpl-radius-pill);
    padding: 0.15rem 0.7rem;
    font-size: 0.85rem;
    font-weight: var(--hpl-weight-semibold);
}

.bicycle-kits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.bicycle-kit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--hpl-border);
    border-radius: var(--hpl-radius-sm);
    padding: 0.35rem;
    font-size: 0.85rem;
}

.bicycle-kit img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: var(--hpl-grey-50);
    border-radius: var(--hpl-radius-sm);
}

.bicycle-kit-empty {
    grid-column: 1 / -1;
    color: var(--hpl-muted);
    font-size: 0.85rem;
}

.bicycle-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--hpl-text);
}

.bicycle-message i {
    font-size: 2.5rem;
    color: var(--hpl-red);
    display: block;
    margin-bottom: 0.75rem;
}

.bicycle-loading {
    text-align: center;
    padding: 2rem 0;
    color: var(--hpl-red);
}

/* cut access button: pinned to the bottom of each card */
.bicycle-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bicycle-card-body .bicycle-kits {
    margin-bottom: 1rem;
}

.bicycle-access-btn {
    margin-top: auto;
    width: 100%;
    background: var(--hpl-red);
    color: var(--hpl-white);
    border: 1px solid var(--hpl-red);
    border-radius: var(--hpl-radius-pill);
    font-weight: var(--hpl-weight-semibold);
    padding: 0.5rem 1rem;
}

.bicycle-access-btn:hover,
.bicycle-access-btn:focus {
    background: var(--hpl-red-dark);
    border-color: var(--hpl-red-dark);
    color: var(--hpl-white);
}

.bicycle-access-btn.is-pending,
.bicycle-access-btn.is-pending:hover {
    background: var(--hpl-grey-100);
    border-color: var(--hpl-grey-300);
    color: var(--hpl-muted);
}

.bicycle-access-btn.is-approved,
.bicycle-access-btn.is-approved:hover {
    background: var(--hpl-success-bg);
    border-color: rgba(10, 122, 51, 0.35);
    color: var(--hpl-success);
    cursor: default;
}

/* "4 bicycle cut credits" under "Access granted": one line, cut with "…" when the card is too narrow */
.bicycle-access-credits {
    display: block;
    font-size: 0.75rem;
    font-weight: var(--hpl-weight-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
