.route-search-main {
    max-width: 1200px;
    padding: 1rem 0 2.5rem;
}

.route-search {
    --route-accent: #d99700;
    --route-accent-soft: #fff2c9;
    --route-blue-deep: #0f2f56;
    --route-blue-mid: #1f5f9a;
    --route-surface: #ffffff;
    --route-border: #d9e3ef;
    --route-text: #16324a;
    --route-muted: #5d7188;
    display: grid;
    gap: 1.25rem;
}

.route-search__hero {
    display: grid;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(217, 151, 0, 0.25), transparent 38%),
        linear-gradient(135deg, #10305a 0%, #195c95 100%);
    color: #fff;
    box-shadow: 0 20px 44px rgba(11, 32, 61, 0.18);
}

.route-search__eyebrow {
    margin: 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.72);
}

body.route-search-page h1.route-search__title {
    margin: 0 0 1rem 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.03;
}

.route-search__subtitle {
    max-width: 62ch;
    margin: 0.5rem 0 0;
    font-size: 1.02rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.route-search__hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.route-search__hero-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.92rem;
    font-weight: 600;
}

.route-search__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.route-search__card {
    border-radius: 22px;
    overflow: hidden;
}

.route-search__card--journey {
    position: relative;
    z-index: 6;
    overflow: visible;
}

.route-search__card--journey .card-content {
    overflow: visible;
}

.route-search__card .card-content {
    padding: 1.15rem 1.2rem 1.25rem;
}

.route-search__section-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 1rem;
}

.route-search__section-head h2 {
    margin: 0;
    color: var(--route-text);
    font-size: 1.45rem;
}

.route-search__section-head p {
    margin: 0.3rem 0 0;
    color: var(--route-muted);
    line-height: 1.45;
}

.route-search__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid var(--route-accent);
    background: var(--route-accent-soft);
    color: var(--route-blue-deep);
    font-weight: 800;
}

.route-search__form {
    display: grid;
    gap: 1rem;
}

.route-search__form--journey {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-search__field-group {
    position: relative;
    display: grid;
    gap: 0.4rem;
}

.route-search__field {
    display: grid;
    gap: 0.38rem;
}

.route-search__field > span {
    color: var(--route-text);
    font-size: 1.2rem;
    font-weight: 700;
}

.route-search__field-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.route-search__field-icon {
    font-size: 1rem;
    line-height: 1;
}

.route-search__text-input,
.route-search__select {
    width: 100%;
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--route-border);
    border-radius: 14px;
    box-sizing: border-box;
    background: #fff;
    color: var(--route-text);
    font-size: 1rem;
}

.route-search__text-input:focus,
.route-search__select:focus {
    border-color: #2d75ba;
    box-shadow: 0 0 0 4px rgba(45, 117, 186, 0.14);
    outline: 0;
}

.route-search__field--compact {
    max-width: 100%;
}

.route-search__options-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-search__field--range {
    gap: 0.55rem;
}

.route-search__range-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.route-search__range-output {
    color: var(--route-blue-deep);
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.route-search__range-input {
    width: 100%;
    margin: 0;
    accent-color: var(--route-blue-mid);
}

.route-search__actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.8rem;
    grid-column: 1 / -1;
}

.route-search__submit {
    min-height: 2.9rem;
    padding-inline: 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f3b6d 0%, #155b95 100%);
}

.route-search__submit:hover,
.route-search__submit:focus {
    background: linear-gradient(135deg, #0d3159 0%, #124a79 100%);
}

.route-search__suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: none;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--route-border);
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(8, 28, 51, 0.14);
    overflow: hidden;
}

.route-search__suggestions[aria-hidden="false"] {
    display: block;
}

.route-search__suggestion {
    width: 100%;
    display: grid;
    gap: 0.18rem;
    padding: 0.82rem 0.92rem;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.route-search__suggestion:not(:last-child) {
    border-bottom: 1px solid #edf2f8;
}

.route-search__suggestion strong {
    color: var(--route-text);
    font-size: 0.98rem;
}

.route-search__suggestion small {
    font-size: 0.93rem;
    line-height: 1.35;
    color: var(--route-muted);
}

.route-search__suggestion:hover,
.route-search__suggestion.is-active {
    background: #f4f9ff;
}

.route-search__hint {
    min-height: 1rem;
    margin: 0;
    color: var(--route-muted);
    font-size: 0.88rem;
}

.route-search__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: #f7fafc;
    color: var(--route-text);
}

.route-search__summary-separator {
    font-size: 1.15rem;
    color: var(--route-accent);
    font-weight: 800;
}

.route-search__summary-item strong {
    font-size: 1.1rem;
}

.route-search__feedback {
    margin: 0.5rem 0 0;
    font-size: 0.93rem;
}

.route-search__feedback--danger {
    color: #9f2231;
}

.route-search__result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.route-search__summary-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.82rem;
    border-radius: 999px;
    background: #eff4f9;
    color: var(--route-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.route-search__summary-chip--accent {
    background: var(--route-accent-soft);
}

.route-search__toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.route-search__view-toggle,
.route-search__sort-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.route-search__toggle-btn,
.route-search__sort-btn {
    min-height: 2.55rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--route-border);
    border-radius: 999px;
    background: #fff;
    color: var(--route-text);
    font-weight: 700;
    cursor: pointer;
}

.route-search__toggle-btn.is-active,
.route-search__sort-btn.is-active {
    background: #0f4c81;
    border-color: #0f4c81;
    color: #fff;
}

.route-search__panels {
    display: grid;
}

.route-search__panel {
    display: none;
}

.route-search__panel.route-search__panel--active {
    display: block;
}

.route-search__cards {
    display: grid;
    gap: 0.9rem;
}

.route-search-station {
    display: block;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid #dbe6f1;
    border-inline-start: 7px solid var(--route-station-color);
    background: linear-gradient(135deg, var(--route-station-soft) 0%, #ffffff 62%);
    box-shadow: 0 12px 28px rgba(12, 34, 58, 0.06);
}

.route-search-station__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 14px;
    background: var(--route-station-color);
    color: #fff;
    font-weight: 800;
    font-size: 1.02rem;
}

.route-search-station__main {
    display: grid;
    gap: 0.78rem;
}

.route-search-station__header {
    display: block;
    align-items: start;
}

.route-search-station__lead {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
}

h3.route-search-station__title {
    min-width: 0;
    margin: 0;
    color: #1b252f;
    font-size: 1.4rem;
    line-height: 1.1;
}

.route-search-station__location {
    margin: 0;
    color: #32475b;
    font-size: 0.97rem;
    line-height: 1.45;
}

.route-search-station__facts {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
}

.route-search-station__facts th,
.route-search-station__facts td {
    padding: 0.72rem 0.82rem;
    border-bottom: 1px solid rgba(15, 76, 129, 0.08);
}

.route-search-station__facts tr:first-child {
    background: linear-gradient(135deg, rgba(255, 242, 201, 0.92) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.route-search-station__facts tr:last-child th,
.route-search-station__facts tr:last-child td {
    border-bottom: 0;
}

.route-search-station__facts th {
    width: 52%;
    color: var(--route-muted);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
}

.route-search-station__facts td {
    color: var(--route-text);
    font-size: 0.97rem;
    font-weight: 700;
    text-align: right;
}

.route-search-station__facts tr:first-child th {
    color: var(--route-blue-deep);
    font-size: 0.94rem;
    font-weight: 800;
}

.route-search-station__facts tr:first-child td {
    color: var(--route-blue-deep);
    font-size: 1.14rem;
    font-weight: 800;
}

.route-search-station__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.route-search-station__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-align: center;
}

.route-search-station__action-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.route-search-station__action--secondary {
    border: 1px solid rgba(15, 76, 129, 0.22);
    color: #0f4c81;
    background: white;
}

.route-search__map {
    width: 100%;
    min-height: 520px;
    border-radius: 20px;
    border: 1px solid var(--route-border);
    overflow: hidden;
}

.route-search__share {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.15rem;
    padding: 1rem;
    border: 1px solid #dbe6f1;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(217, 151, 0, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(245, 249, 253, 0.94) 0%, #ffffff 100%);
}

.route-search__share-head h3 {
    margin: 0;
    color: var(--route-text);
    font-size: 1.18rem;
}

.route-search__share-head p {
    margin: 0.3rem 0 0;
    color: var(--route-muted);
    line-height: 1.45;
}

.route-search__share-actions {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.route-search__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.95rem;
    padding-inline: 1rem;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
}

.route-search__share-btn:hover,
.route-search__share-btn:focus {
    opacity: 0.96;
}

.route-search__share-btn--whatsapp {
    background: linear-gradient(135deg, #178a46 0%, #24b35b 100%);
}

.route-search__share-btn--telegram {
    background: linear-gradient(135deg, #1571a4 0%, #2497d3 100%);
}

.route-search__share-btn--email {
    background: linear-gradient(135deg, #9b5a05 0%, #d99700 100%);
}

.route-search__share-btn--native {
    background: linear-gradient(135deg, #0f3b6d 0%, #155b95 100%);
}

.route-search__share-btn--copy {
    background: #fff;
    color: var(--route-blue-deep);
    border: 1px solid rgba(15, 76, 129, 0.22);
}

.route-search__share-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.route-search__share-link {
    display: grid;
    gap: 0.38rem;
}

.route-search__share-link > span {
    color: var(--route-text);
    font-size: 0.96rem;
    font-weight: 700;
}

.route-search__share-input {
    width: 100%;
    min-height: 2.95rem;
    padding: 0.78rem 0.95rem;
    border: 1px solid var(--route-border);
    border-radius: 14px;
    box-sizing: border-box;
    background: #fff;
    color: var(--route-text);
    font-size: 0.98rem;
}

.route-search__share-input:focus {
    border-color: #2d75ba;
    box-shadow: 0 0 0 4px rgba(45, 117, 186, 0.14);
    outline: 0;
}

.route-search__share-feedback {
    min-height: 1.2rem;
    margin: 0;
    color: #177345;
    font-size: 0.92rem;
    font-weight: 700;
}

.route-search__share-feedback.is-error {
    color: #9f2231;
}

.route-search__empty {
    padding: 1.15rem 0;
    color: var(--route-muted);
}

.route-search__empty h3 {
    margin: 0 0 0.35rem;
    color: var(--route-text);
    font-size: 1.25rem;
}

.route-search__empty p {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .route-search__grid {
        grid-template-columns: 1fr;
    }

    .route-search__form--journey {
        grid-template-columns: 1fr;
    }

    .route-search__options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .route-search-main {
        padding-top: 0.75rem;
    }

    .route-search__hero {
        padding: 1rem;
        border-radius: 20px;
    }

    .route-search__subtitle {
        font-size: 0.98rem;
    }

    .route-search__card .card-content {
        padding: 1rem;
    }

    .route-search-station {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .route-search-station__rank {
        width: 2.1rem;
        height: 2.1rem;
    }

    .route-search-station__facts th,
    .route-search-station__facts td {
        padding: 0.68rem 0.76rem;
    }

    .route-search__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .route-search__view-toggle,
    .route-search__sort-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-search__sort-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .route-search__toggle-btn,
    .route-search__sort-btn {
        justify-content: center;
    }

    .route-search__map {
        min-height: 400px;
    }

    .route-search__share-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
