/**
 * Standalone Race Detail — компактная шапка заезда с постером.
 *
 * Постер больше не занимает отдельную строку: он стоит слева от названия,
 * статусов, быстрых фактов и действий; справа от него больше нет пустоты.
 */

.race-hero {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    overflow: hidden;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.05),
        0 16px 30px -24px rgba(16, 24, 40, 0.4);
}

.race-hero__poster-wrap {
    display: flex;
    flex: 0 0 250px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 200px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-tertiary);
}

.race-hero__poster {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
}

.race-hero__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.15rem 0.15rem 0.15rem 0;
}

.race-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.race-hero__head {
    min-width: 0;
}

.race-hero__title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.race-hero__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.race-hero__badges .badge,
.race-hero__badges .event-status-badge {
    margin: 0;
}

.race-hero__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.4rem;
}

.race-hero__actions .btn {
    white-space: nowrap;
}

.race-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.3;
}

.race-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    white-space: nowrap;
}

.race-hero__meta-item i {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 0.9em;
}

@media (max-width: 991.98px) {
    .race-hero {
        flex-direction: column;
        padding: 0.65rem;
    }

    .race-hero__poster-wrap {
        flex: 0 0 auto;
        width: 100%;
        max-width: 280px;
        min-height: 0;
        margin: 0 auto;
    }

    .race-hero__poster {
        max-height: 280px;
    }

    .race-hero__content {
        padding: 0;
    }

    .race-hero__top {
        flex-direction: column;
        gap: 0.6rem;
    }

    .race-hero__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .race-hero__actions .btn {
        flex: 1 1 auto;
    }

    .race-hero__title {
        font-size: 1.55rem;
    }

    .race-hero__meta {
        margin-top: 0.25rem;
    }
}

@media (max-width: 575.98px) {
    .race-hero__title {
        font-size: 1.4rem;
    }

    .race-hero__meta {
        gap: 0.3rem 0.75rem;
        font-size: 0.72rem;
    }
}
