/* Motion: poster-style, quick and editorial */

@keyframes rb-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rb-slide-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rb-pop {
    0% { transform: scale(0.96); }
    70% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes rb-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes rb-sheet-down {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes rb-sheet-scale-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rb-sheet-scale-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

@keyframes rb-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.rb-header-row {
    animation: rb-rise 0.55s var(--ease) both;
}

.rb-grid .rb-card {
    animation: rb-rise 0.5s var(--ease) both;
}

.rb-grid .rb-card:nth-child(1) { animation-delay: 0.05s; }
.rb-grid .rb-card:nth-child(2) { animation-delay: 0.1s; }
.rb-grid .rb-card:nth-child(3) { animation-delay: 0.15s; }
.rb-grid .rb-card:nth-child(4) { animation-delay: 0.2s; }
.rb-grid .rb-card:nth-child(5) { animation-delay: 0.25s; }
.rb-grid .rb-card:nth-child(6) { animation-delay: 0.3s; }
.rb-grid .rb-card:nth-child(7) { animation-delay: 0.35s; }

.rb-mine,
.rb-equipment,
.rb-foot {
    animation: rb-rise 0.55s var(--ease) 0.32s both;
}

.rb-back {
    animation: rb-fade-in 0.4s var(--ease) both;
}

.rb-hero-photo {
    animation: rb-rise 0.5s var(--ease) 0.06s both;
}

.rb-intro {
    animation: rb-rise 0.5s var(--ease) 0.12s both;
}

.rb-panel {
    animation: rb-rise 0.5s var(--ease) 0.18s both;
}

.rb-card {
    transition:
        border-color 0.2s var(--ease),
        border-width 0.2s var(--ease),
        background 0.2s var(--ease);
}

.rb-card-link {
    display: inline-block;
    transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.rb-card:active {
    transform: scale(0.995);
}

.rb-collage-plus {
    transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

@media (hover: hover) {
    .rb-card:hover .rb-card-link {
        transform: translateX(3px);
    }

    .rb-card-bundle:hover .rb-collage-plus {
        transform: scale(1.12);
    }

    .rb-day:hover:not(.active) {
        transform: translateY(-1px);
        border-color: var(--line-strong);
    }

    .rb-time.open:hover {
        transform: translateX(4px);
    }
}

.rb-btn {
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s,
        transform 0.12s var(--ease);
}

.rb-btn:active {
    transform: scale(0.97);
}

.rb-day {
    transition:
        border-color 0.2s var(--ease),
        background 0.2s var(--ease),
        color 0.2s var(--ease),
        transform 0.2s var(--ease);
}

.rb-day.active {
    animation: rb-pop 0.28s var(--ease);
}

.rb-week-range {
    transition: opacity 0.2s var(--ease);
}

.rb-week-range.is-changing {
    opacity: 0.35;
}

.rb-days.rb-bump .rb-day {
    animation: rb-slide-in 0.32s var(--ease) both;
}

.rb-days.rb-bump .rb-day:nth-child(1) { animation-delay: 0.02s; }
.rb-days.rb-bump .rb-day:nth-child(2) { animation-delay: 0.04s; }
.rb-days.rb-bump .rb-day:nth-child(3) { animation-delay: 0.06s; }
.rb-days.rb-bump .rb-day:nth-child(4) { animation-delay: 0.08s; }
.rb-days.rb-bump .rb-day:nth-child(5) { animation-delay: 0.1s; }
.rb-days.rb-bump .rb-day:nth-child(6) { animation-delay: 0.12s; }
.rb-days.rb-bump .rb-day:nth-child(7) { animation-delay: 0.14s; }

.rb-times.rb-bump .rb-time,
.rb-times.rb-bump .rb-empty {
    animation: rb-slide-in 0.28s var(--ease) both;
}

.rb-times.rb-bump .rb-time:nth-child(1),
.rb-times.rb-bump .rb-empty { animation-delay: 0.02s; }
.rb-times.rb-bump .rb-time:nth-child(2) { animation-delay: 0.04s; }
.rb-times.rb-bump .rb-time:nth-child(3) { animation-delay: 0.06s; }
.rb-times.rb-bump .rb-time:nth-child(4) { animation-delay: 0.08s; }
.rb-times.rb-bump .rb-time:nth-child(5) { animation-delay: 0.1s; }
.rb-times.rb-bump .rb-time:nth-child(6) { animation-delay: 0.12s; }
.rb-times.rb-bump .rb-time:nth-child(7) { animation-delay: 0.14s; }
.rb-times.rb-bump .rb-time:nth-child(8) { animation-delay: 0.16s; }
.rb-times.rb-bump .rb-time:nth-child(9) { animation-delay: 0.18s; }
.rb-times.rb-bump .rb-time:nth-child(10) { animation-delay: 0.2s; }

.rb-time {
    transition:
        border-color 0.18s var(--ease),
        background 0.18s var(--ease),
        transform 0.18s var(--ease),
        box-shadow 0.18s var(--ease);
}

.rb-time.selected {
    animation: rb-pop 0.22s var(--ease);
}

.rb-times.is-loading {
    opacity: 1;
    pointer-events: none;
    position: relative;
}

.rb-times.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 45%,
        transparent 90%
    );
    background-size: 200% 100%;
    animation: rb-shimmer 1.1s linear infinite;
    pointer-events: none;
}

.rb-dur {
    transition:
        background 0.18s var(--ease),
        border-color 0.18s var(--ease),
        color 0.18s var(--ease),
        transform 0.15s var(--ease);
}

.rb-dur:active {
    transform: scale(0.96);
}

.rb-dur.active {
    animation: rb-pop 0.2s var(--ease);
}

.rb-modal {
    display: flex;
    visibility: hidden;
    pointer-events: none;
}

.rb-modal.open,
.rb-modal.is-closing {
    visibility: visible;
    pointer-events: auto;
}

.rb-modal-bg {
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.rb-modal.open .rb-modal-bg,
.rb-modal.is-closing .rb-modal-bg {
    opacity: 1;
}

.rb-modal.is-closing .rb-modal-bg {
    opacity: 0;
}

.rb-sheet {
    transition: transform 0.32s var(--ease), opacity 0.28s var(--ease);
}

.rb-modal:not(.open):not(.is-closing) .rb-sheet {
    transform: translateY(100%);
    opacity: 0;
}

.rb-modal.open .rb-sheet {
    animation: rb-sheet-up 0.34s var(--ease) both;
}

.rb-modal.is-closing .rb-sheet {
    animation: rb-sheet-down 0.28s var(--ease) both;
}

@media (min-width: 600px) {
    .rb-modal:not(.open):not(.is-closing) .rb-sheet {
        transform: translateY(12px) scale(0.98);
    }

    .rb-modal.open .rb-sheet {
        animation: rb-sheet-scale-in 0.32s var(--ease) both;
    }

    .rb-modal.is-closing .rb-sheet {
        animation: rb-sheet-scale-out 0.24s var(--ease) both;
    }
}

.rb-page-error.show {
    animation: rb-slide-in 0.28s var(--ease);
}

.rb-mine li {
    animation: rb-slide-in 0.3s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
