* {
    font-family: 'Nunito', sans-serif;
}

.container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    gap: 20px;
}

.formulario {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 450px !important;
}

.btnComprar {
    max-width: 500px;
    text-align: center;
    margin: auto;
}

.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.tab-buttons {
    display: flex;
    align-items: center;
}

.resultados-busqueda h2 {
    font-family: "Raleway", Sans-serif;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #000000;
    text-align: center;
}

.encabezado {
    color: black;
    font-weight: 800;
    font-size: 14px;
}

.tablink {
    background-color: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    flex: 1;
    text-align: left;
    color: #aaa;
    transition: color 0.3s;
}

.tablink.active {
    color: #002856;
    font-weight: bold;
}

.switch-group {
    display: flex;
    align-items: center;
}

.switch-group .label-icon {
    margin-right: 10px;
    color: #aaa;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #8fc33a;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.input-group {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    background-color: #fff;
}

.label-icon {
    display: flex;
    align-items: center;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 5px;
}

.label-icon img {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.input-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-container img {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.destino-container {
    position: relative;
}

.destino-container .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    margin: 0;
}

.destino-container .select2-container {
    width: 100% !important;
}

.destino-container .select2-container--default .select2-selection--single {
    height: auto;
    padding: 6px 32px 6px 0;
    background: transparent;
    border: 1px solid #d9e0e6 !important;
    border-radius: 8px;
}

.destino-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 10px;
    color: #002856;
    font-size: 16px;
    line-height: 1.4;
}

.destino-container .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #7a7a7a;
}

.destino-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

.destino-container .select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 28px;
    color: #aaa;
}

.select2-container--default .select2-results__option {
    background-color: #ffffff;
    color: #002856;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 16px;
    font-size: 15px;
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background-color: #f3f8ea;
    color: #002856;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f3f8ea;
    color: #002856;
}

.formulario select:hover,
.formulario select:focus {
    background-color: transparent;
}

.travel-type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.formulario .travel-type-btn {
    border: 1px solid #8fc33a;
    background-color: #f0f8e8;
    color: #8fc33a;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.formulario .travel-type-btn:hover:not(.active),
.formulario .travel-type-btn:focus:not(.active) {
    background-color: #f0f8e8;
    color: #8fc33a;
    border-color: #8fc33a;
}

.formulario .travel-type-btn.active,
.formulario .travel-type-btn.active:hover,
.formulario .travel-type-btn.active:focus {
    background-color: #8fc33a;
    color: #ffffff;
    border-color: #8fc33a;
}


select,
input[type="date"] {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #002856;
    outline: none;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single {
    border: none !important;
}

.select2-container--default .select2-dropdown {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 4px;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px;
    background-color: #ffffff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e5e5e5 !important;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: #002856;
    outline: none;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('assets/icons/arrow-down.svg');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

input[type="date"] {
    background-color: transparent;
    border: none;
    box-sizing: border-box;
    outline: 0;
    padding: .75rem;
    position: relative;
    width: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

input[type="submit"] {
    background-color: #8fc33a;
    border: none;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #7cb030;
}

.resultados-busqueda {
    width: 1000px;
}

.resultado {
    background-color: white;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resultado-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    /* Cambiado de baseline a center para evitar cortes */
}

.resultado-detalles {
    display: flex;
    align-items: start;
    flex-direction: column;
    width: 250px;
}

.icono-tipo {
    max-width: 200px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.icono-tipo img {
    width: 100%;
}

.logo-bus {
    max-height: 50px;
}

.descripcion {
    display: flex;
    flex-direction: column;
}

.ciudad {
    font-size: 18px;
    color: #002856;
    font-weight: bold;
}

.tipo {
    font-size: 14px;
    color: #aaa;
}

.salida {
    background-color: #285fe71f;
    color: #8fc33a;
    font-size: 14px;
    display: flex;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 300;
    align-items: center;
}



.resultado-horario {
    display: flex;
    justify-content: space-evenly;
    flex: 1;
    text-align: center;
    margin: auto;
}

.resultado-origen,
.resultado-destino {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resultado-origen .ciudad,
.resultado-destino .ciudad {
    font-weight: 300;
}

.resultado-hora {
    font-size: 24px;
    color: #002856;
    font-weight: bold;
    margin: auto;
}

.resultado-icono {
    display: none;
}

.resultado-icono img {
    width: 125px;
    height: auto;
}

.resultado-paradas {
    color: #8fc33a;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.resultado-paradas .arrow-down {
    border: solid #8fc33a;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 5px;
    transform: rotate(45deg);
}

.resultado-comprar {
    background-color: #8fc33a;
    border: none;
    color: white;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    text-align: center;
    font-size: 18px;
    text-decoration: none;
}

/* Nuevos estilos para Salidas y Llegadas */

@media only screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .formulario {
        width: 100%;
        max-width: none;
        margin-bottom: 150px;
    }

    .resultado {
        padding: 20px;
    }

    .resultado-info,
    .resultado-horario,
    .resultado-origen,
    .resultado-destino {
        flex-direction: column;
        align-items: center;
    }

    .resultado-icono {
        margin: 20px 0;
    }

    .resultado-comprar {
        width: 80%;
        padding: 10px 20px;
    }

    .resultado-icono img {
        width: 100px;
        height: auto;
    }

    .resultados-busqueda {
        width: 100%;
    }

    .resultado-detalles {
        align-items: center;
        margin-bottom: 20px;
    }


}

.dias-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.dia {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-weight: bold;
    font-size: 10px;
    color: white;
    flex-shrink: 0;
}

.activo {
    background-color: #8fc33a;
}

.inactivo {
    background-color: #ddd;
    /* gris */
    color: #555;
}

/* ──────────────────────────────────────────────────────────────
 *  Shortcode [salidas_llegadas_beta]
 *  Tabla de próximas salidas / llegadas en tiempo real
 * ────────────────────────────────────────────────────────────── */
.sll-tabla {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Nunito', sans-serif;
    /* overflow visible para que el tooltip de paradas pueda escapar de la tarjeta */
}

.sll-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    background: #ffffff;
    position: relative;
}

.sll-tab {
    background: #eef0f2;
    border: none;
    color: #6c757d;
    padding: 18px 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, color 0.2s;
}

.sll-tab:first-child { border-top-left-radius: 12px; }
.sll-tab:last-child  { border-top-right-radius: 12px; }

.sll-tab:hover:not(.active) {
    background: #e1e5e8;
}

.sll-tab.active {
    background: #8fc33a;
    color: #ffffff;
    position: relative;
}

.sll-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #8fc33a;
    z-index: 1;
}

.sll-panel {
    padding: 8px 0 0 0;
}

.sll-row {
    display: grid;
    grid-template-columns: 110px 110px 1fr 80px 100px;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    column-gap: 12px;
}

.sll-row:last-child {
    border-bottom: none;
}

.sll-row.sll-header {
    padding-top: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.sll-row.sll-header .sll-col {
    color: #8fc33a;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.sll-col {
    display: block;
    line-height: 1.3;
}

.sll-col.sll-linea {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sll-col.sll-linea .sll-badge {
    display: inline-block;
    background: #8fc33a;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.sll-col.sll-linea img {
    max-width: 90px;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.sll-col.sll-salida {
    text-align: center;
}

.sll-col.sll-salida .sll-min-pill {
    display: inline-block;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    margin-bottom: 2px;
    line-height: 1.5;
}

.sll-col.sll-salida .sll-pill-urgent {
    background: #fde2e2;
    color: #c62828;
}

.sll-col.sll-salida .sll-pill-soon {
    background: #fff4cc;
    color: #b07000;
}

.sll-col.sll-salida .sll-pill-ok {
    background: #e6f4d2;
    color: #4f7d22;
}

.sll-col.sll-salida .sll-pill-now {
    background: #d6e9fb;
    color: #1565c0;
}

.sll-col.sll-salida .sll-hora {
    display: block;
    color: #002856;
    font-weight: 700;
    font-size: 17px;
}

.sll-col.sll-destino .sll-ciudad {
    display: block;
    color: #002856;
    font-weight: 700;
    font-size: 16px;
}

.sll-col.sll-destino .sll-recorrido {
    display: inline-block;
    position: relative;
    color: #9aa0a6;
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-top: 4px;
    text-transform: uppercase;
    cursor: default;
}

.sll-col.sll-destino .sll-recorrido-text {
    display: inline;
}

.sll-paradas-tooltip {
    display: none;
    position: absolute;
    z-index: 1000;
    left: 0;
    top: calc(100% + 8px);
    background: #1a1d28;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    min-width: 220px;
    max-width: 360px;
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
    line-height: 1.5;
}

.sll-paradas-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: #1a1d28;
    transform: rotate(45deg);
}

.sll-paradas-tooltip ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: sll-paradas;
}

.sll-paradas-tooltip li {
    counter-increment: sll-paradas;
    color: #ffffff;
    padding: 3px 0;
}

.sll-paradas-tooltip li::before {
    content: counter(sll-paradas) ". ";
    color: #ffffff;
    font-weight: 600;
    margin-right: 4px;
}

.sll-col.sll-destino .sll-recorrido:hover .sll-paradas-tooltip,
.sll-col.sll-destino .sll-recorrido:focus-within .sll-paradas-tooltip {
    display: block;
}

.sll-col.sll-anden {
    display: flex;
    justify-content: center;
}

.sll-col.sll-anden .sll-circle {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #8fc33a;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.sll-col.sll-anden .sll-circle-empty {
    color: #b9bec3;
    font-weight: 700;
    font-size: 18px;
}

.sll-col.sll-aviso {
    color: #8a8a8a;
    font-size: 12px;
}

.sll-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    padding: 24px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .sll-row {
        grid-template-columns: 80px 80px 1fr 60px;
        column-gap: 8px;
        padding: 12px 14px;
    }
    .sll-col.sll-aviso {
        display: none;
    }
    .sll-col.sll-anden .sll-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .sll-col.sll-destino .sll-recorrido {
        font-size: 10px;
    }
}