/* BiharYaatra - mobile-first customer & rider experience */
.by-app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--by-bg);
    position: relative;
    padding-bottom: 76px;
}

.by-app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(135deg, var(--by-primary), var(--by-primary-dark));
    color: #fff;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.by-app-header .by-app-title { font-weight: 700; font-size: 1.05rem; }
.by-app-header .by-app-sub { font-size: .78rem; opacity: .85; }

.by-app-body { padding: 1rem; }

.by-bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-top: 1px solid var(--by-line);
    display: flex;
    z-index: 60;
}

.by-bottom-nav a {
    flex: 1;
    text-align: center;
    padding: .55rem 0 .65rem;
    color: var(--by-muted);
    font-size: .7rem;
    font-weight: 600;
}

.by-bottom-nav a i { display: block; font-size: 1.25rem; margin-bottom: 2px; }
.by-bottom-nav a.active { color: var(--by-primary); }

.by-tiles { display: grid; gap: .75rem; }

.by-tile {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--by-line);
    border-radius: var(--by-radius);
}

.by-tile .by-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--by-primary-light);
    color: var(--by-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.by-tile h6 { margin: 0; font-weight: 700; }
.by-tile p { margin: 0; font-size: .82rem; color: var(--by-muted); }

.by-route-option {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem;
    border: 2px solid var(--by-line);
    border-radius: var(--by-radius);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.by-route-option.selected {
    border-color: var(--by-primary);
    box-shadow: 0 0 0 3px var(--by-primary-light);
}

.by-route-option .by-route-line { font-weight: 700; }
.by-route-option .by-route-meta { font-size: .8rem; color: var(--by-muted); }

.by-vehicle-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .85rem .5rem;
    border: 2px solid var(--by-line);
    border-radius: var(--by-radius);
    background: #fff;
    cursor: pointer;
    min-width: 96px;
    text-align: center;
}

.by-vehicle-option.selected {
    border-color: var(--by-primary);
    box-shadow: 0 0 0 3px var(--by-primary-light);
}

.by-vehicle-option i { font-size: 1.6rem; color: var(--by-primary); }
.by-vehicle-option .name { font-weight: 700; font-size: .85rem; }
.by-vehicle-option .cap { font-size: .72rem; color: var(--by-muted); }

.by-hscroll {
    display: flex;
    gap: .65rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    -webkit-overflow-scrolling: touch;
}

.by-hscroll::-webkit-scrollbar { height: 5px; }
.by-hscroll::-webkit-scrollbar-thumb { background: var(--by-line); border-radius: 4px; }

.by-map {
    width: 100%;
    height: 300px;
    border-radius: var(--by-radius);
    overflow: hidden;
    border: 1px solid var(--by-line);
    z-index:9;
}

.by-stepper { display: flex; flex-direction: column; gap: .1rem; }

.by-step {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    position: relative;
    padding-bottom: 1.1rem;
}

.by-step:last-child { padding-bottom: 0; }

.by-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: var(--by-line);
}

.by-step .dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--by-line);
    color: var(--by-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
    z-index: 1;
}

.by-step.done .dot { background: var(--by-primary); color: #fff; }
.by-step.active .dot { background: var(--by-accent); color: #1f2937; }
.by-step .label { font-weight: 700; font-size: .9rem; }
.by-step .time { font-size: .75rem; color: var(--by-muted); }

.by-rating i { color: var(--by-accent); cursor: pointer; font-size: 1.5rem; }

.by-stat {
    background: #fff;
    border: 1px solid var(--by-line);
    border-radius: var(--by-radius);
    padding: .85rem;
    text-align: center;
}

.by-stat .value { font-size: 1.4rem; font-weight: 800; color: var(--by-primary); }
.by-stat .label { font-size: .74rem; color: var(--by-muted); text-transform: uppercase; letter-spacing: .3px; }

.by-offline-banner {
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    padding: .4rem;
}

@media (max-width: 520px) {
    .by-app { max-width: 100%; }
    .by-bottom-nav { max-width: 100%; }
}

/* ---------------- Auth pages (customer / rider login & registration) ---------------- */
.by-auth {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.by-auth-wide { max-width: 780px; }

.by-auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.by-auth-brand img { width: 38px; height: 38px; object-fit: contain; }

.by-auth-card {
    background: var(--by-surface);
    border: 1px solid var(--by-line);
    border-radius: var(--by-radius);
    box-shadow: var(--by-shadow);
    padding: 1.75rem;
}

.by-auth-hero { text-align: center; margin-bottom: 1.5rem; }

.by-auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--by-primary-light);
    color: var(--by-primary);
    margin-bottom: .75rem;
    overflow: hidden;
}

.by-auth-foot {
    margin-top: auto;
    text-align: center;
    font-size: .78rem;
    color: var(--by-muted);
    padding-top: 1.5rem;
}

.by-auth-rider .by-auth-hero .by-auth-icon {
    background: #fef3c7;
    color: var(--by-accent-dark);
}

.by-auth-rider .by-auth-card { border-top: 4px solid var(--by-accent); }

@media (max-width: 520px) {
    .by-auth { padding: 1rem; }
    .by-auth-card { padding: 1.25rem; }
}
