/**
 * @file: team_registration_completion.css
 * @description: Стили чеклиста готовности командной заявки
 */

.team-reg-completion-card {
    border-left: 4px solid #0d6efd;
}

.team-reg-completion-card.action-required {
    border-left-color: #ffc107;
}

.team-reg-completion-card.complete {
    border-left-color: #198754;
}

.team-reg-stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-reg-step {
    position: relative;
    flex: 1 1 140px;
    min-width: 120px;
    padding: 0.5rem 1.75rem 1.6rem 0.65rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    font-size: 0.8rem;
}

.team-reg-step-hint {
    display: block;
    padding-right: 0.15rem;
}

.team-reg-step-icon {
    position: absolute;
    right: 0.45rem;
    bottom: 0.4rem;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.team-reg-step-icon--done {
    color: #198754;
}

.team-reg-step-icon--pending {
    color: #b45309;
}

.team-reg-step.action_required .team-reg-step-icon--pending {
    color: #dc3545;
}

.team-reg-step.blocked .team-reg-step-icon--pending {
    color: #6c757d;
}

.team-reg-step.done {
    background-color: #d1e7dd;
}

.team-reg-step.waiting {
    background-color: #fff3cd;
}

.team-reg-step.action_required {
    background-color: #ffe5b4;
}

.team-reg-step.blocked {
    background-color: #e9ecef;
    opacity: 0.85;
}

.team-reg-step-title {
    font-weight: 600;
    display: block;
}

.team-reg-onboarding-card {
    border: 1px dashed #0d6efd;
}

.captain-reg-cta-btn--attention {
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.45);
}

.captain-reg-cta-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    border: 1px solid #fff;
}

.captain-reg-cta-alert {
    border-left: 4px solid #ffc107;
}

.championship-info-card .captain-reg-cta-wrap {
    flex-shrink: 0;
}

.championship-info-card .captain-reg-cta-btn {
    white-space: nowrap;
}

/* Тёмная тема: пастельные фоны шагов + светлый текст body → низкий контраст заголовков */
[data-theme="dark"] .team-reg-step {
    background-color: var(--bg-tertiary, #21262d);
    color: var(--text-primary, #e6edf3);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .team-reg-step.done {
    background-color: rgba(25, 135, 84, 0.22);
    border-color: rgba(25, 135, 84, 0.45);
}

[data-theme="dark"] .team-reg-step.waiting {
    background-color: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.4);
}

[data-theme="dark"] .team-reg-step.action_required {
    background-color: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.45);
}

[data-theme="dark"] .team-reg-step.blocked {
    background-color: var(--bg-secondary, #161b22);
    opacity: 1;
}

[data-theme="dark"] .team-reg-step-title {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .team-reg-step .text-muted,
[data-theme="dark"] .team-reg-step-hint {
    color: var(--text-muted, #8b949e) !important;
}

[data-theme="dark"] .team-reg-step-icon--done {
    color: #3fb950;
}

[data-theme="dark"] .team-reg-step-icon--pending {
    color: #d29922;
}

[data-theme="dark"] .team-reg-step.action_required .team-reg-step-icon--pending {
    color: #f85149;
}

[data-theme="dark"] .team-reg-completion-card {
    border-left-color: #58a6ff;
}

[data-theme="dark"] .team-reg-completion-card.action-required {
    border-left-color: #d29922;
}

[data-theme="dark"] .team-reg-completion-card.complete {
    border-left-color: #3fb950;
}

[data-theme="dark"] .team-reg-onboarding-card {
    border-color: #58a6ff;
}

/* Стартовая конфигурация пилота в таблице состава */
.team-rig-col {
    min-width: 11rem;
    max-width: 16rem;
    vertical-align: middle !important;
}

.driver-rig-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.375rem;
    border-left: 3px solid transparent;
    background-color: #f8f9fa;
    font-size: 0.875rem;
    line-height: 1.35;
}

.driver-rig-cell--ready {
    border-left-color: #198754;
    background-color: #d1e7dd;
}

.driver-rig-cell--partial {
    border-left-color: #0dcaf0;
    background-color: #cff4fc;
}

.driver-rig-cell--planned {
    border-left-color: #0d6efd;
    background-color: #cfe2ff;
}

.driver-rig-cell--assignable {
    border-left-color: #198754;
    background-color: #e8f5e9;
}

.driver-rig-cell--pending {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.driver-rig-cell--waiting {
    border-left-color: #adb5bd;
    background-color: #e9ecef;
}

.driver-rig-cell--empty {
    background-color: transparent;
    padding-left: 0;
}

.driver-rig-state {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #495057;
}

.driver-rig-primary {
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

.driver-rig-livery {
    font-size: 0.75rem;
    font-weight: 500;
}

.driver-rig-hint {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.3;
}

.driver-rig-link {
    font-size: 0.78rem;
    text-decoration: none;
}

.driver-rig-action {
    margin-top: 0.35rem;
    width: 100%;
}

@keyframes driver-rig-assign-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 3px rgba(25, 135, 84, 0.55),
            0 4px 14px rgba(25, 135, 84, 0.45);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 0 10px rgba(25, 135, 84, 0),
            0 6px 20px rgba(25, 135, 84, 0.65);
        filter: brightness(1.12);
    }
}

.driver-rig-cell--assignable .driver-rig-assign-btn {
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 2px solid #0f5132 !important;
    animation: driver-rig-assign-pulse 1.15s ease-in-out infinite;
    will-change: transform, box-shadow, filter;
}

.driver-rig-cell--assignable .driver-rig-assign-btn:hover,
.driver-rig-cell--assignable .driver-rig-assign-btn:focus {
    animation-play-state: paused;
    transform: scale(1.06);
    box-shadow:
        0 0 0 4px rgba(25, 135, 84, 0.65),
        0 8px 22px rgba(25, 135, 84, 0.55) !important;
}

@media (prefers-reduced-motion: reduce) {
    .driver-rig-cell--assignable .driver-rig-assign-btn {
        animation: none;
        box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.55) !important;
        font-weight: 700;
    }
}

@keyframes driver-rig-assign-pulse-dark {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 3px rgba(63, 185, 80, 0.6),
            0 4px 14px rgba(63, 185, 80, 0.4);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 0 10px rgba(63, 185, 80, 0),
            0 6px 20px rgba(63, 185, 80, 0.55);
        filter: brightness(1.15);
    }
}

[data-theme="dark"] .driver-rig-cell--assignable .driver-rig-assign-btn {
    border-color: #3fb950 !important;
    animation-name: driver-rig-assign-pulse-dark;
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="dark"] .driver-rig-cell--assignable .driver-rig-assign-btn {
        animation: none;
        box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.55) !important;
    }
}

[data-theme="dark"] .driver-rig-cell {
    background-color: var(--bg-tertiary, #21262d);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

[data-theme="dark"] .driver-rig-cell--ready {
    border-left-color: #3fb950;
    background-color: rgba(25, 135, 84, 0.18);
}

[data-theme="dark"] .driver-rig-cell--partial {
    border-left-color: #39c5cf;
    background-color: rgba(13, 202, 240, 0.12);
}

[data-theme="dark"] .driver-rig-cell--planned {
    border-left-color: #58a6ff;
    background-color: rgba(13, 110, 253, 0.15);
}

[data-theme="dark"] .driver-rig-cell--assignable {
    border-left-color: #3fb950;
    background-color: rgba(25, 135, 84, 0.12);
}

[data-theme="dark"] .driver-rig-cell--pending {
    border-left-color: #d29922;
    background-color: rgba(255, 193, 7, 0.12);
}

[data-theme="dark"] .driver-rig-cell--waiting {
    border-left-color: #8b949e;
    background-color: var(--bg-secondary, #161b22);
}

[data-theme="dark"] .driver-rig-state {
    color: var(--text-muted, #8b949e);
}

[data-theme="dark"] .driver-rig-primary {
    color: var(--text-primary, #e6edf3);
}

[data-theme="dark"] .driver-rig-hint {
    color: var(--text-muted, #8b949e);
}
