/* Responsive del plugin Horarios Autobus */

#ha-resultados-wrapper.ha-shortcode-scope,
.ha-shortcode-scope.horarios-autobus.container {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 2200px !important;
    margin: 0 auto 20px !important;
    padding: 0 16px;
    box-sizing: border-box;
}

.ha-shortcode-scope.formulario {
    width: min(100%, 450px) !important;
    max-width: 450px !important;
    margin: 0 auto 20px;
    box-sizing: border-box;
}

.ha-shortcode-scope.horarios-autobus.container .resultados-busqueda,
#ha-resultados-wrapper.ha-shortcode-scope .resultados-busqueda {
    flex: 1 1 560px;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
}

.ha-shortcode-scope form,
.ha-shortcode-scope .resultado,
.ha-shortcode-scope .resultado-info,
.ha-shortcode-scope .resultado-detalles,
.ha-shortcode-scope .resultado-horario,
.ha-shortcode-scope .results-list,
.ha-shortcode-scope .input-group {
    box-sizing: border-box;
    min-width: 0;
}

.ha-shortcode-scope .resultados-busqueda h2 {
    overflow-wrap: anywhere;
}

.ha-shortcode-scope .resultado {
    width: 100%;
}

.ha-shortcode-scope .resultado-info {
    grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
    gap: 20px;
}

.ha-shortcode-scope .resultado-detalles {
    width: 100%;
}

.ha-shortcode-scope .resultado-horario {
    /* gap: 10px; */
}

.ha-shortcode-scope .resultado-origen,
.ha-shortcode-scope .resultado-destino,
.ha-shortcode-scope .ciudad,
.ha-shortcode-scope .resultado-hora {
    min-width: 0;
}

.ha-shortcode-scope .ciudad {
    overflow-wrap: anywhere;
}

.ha-shortcode-scope .resultado-comprar,
.ha-shortcode-scope .btn-back,
.ha-shortcode-scope .btn-pdf {
    max-width: 100%;
}

.ha-shortcode-scope .ha-results-actions {
    width: 100%;
}

.ha-shortcode-scope .ha-results-actions .btn-back,
.ha-shortcode-scope .ha-results-actions .btn-pdf {
    justify-content: center;
}

.ha-shortcode-scope .ha-tipo-viaje-container {
    flex-wrap: wrap;
}

.ha-shortcode-scope .ha-radio-label {
    min-width: 0;
}

.ha-shortcode-scope .ha-compra-modal-content {
    width: min(100% - 24px, 520px);
    margin-left: auto;
    margin-right: auto;
}

.ha-proximos-wrapper {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
}

.ha-scroll-container {
    width: 100%;
    max-width: 100%;
}

.ha-tabla-proximos {
    width: 100% !important;
    table-layout: fixed;
}

.ha-tabla-proximos th,
.ha-tabla-proximos td {
    overflow-wrap: anywhere;
}

@media only screen and (min-width: 1025px) {
    #ha-resultados-wrapper.ha-shortcode-scope,
    .ha-shortcode-scope.horarios-autobus.container {
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 28px !important;
    }

    .ha-shortcode-scope.horarios-autobus.container .resultados-busqueda,
    #ha-resultados-wrapper.ha-shortcode-scope .resultados-busqueda {
        flex: 0 0 calc(50% - 14px) !important;
        width: calc(50% - 14px) !important;
        max-width: calc(50% - 14px) !important;
        min-width: 0 !important;
    }

    .ha-shortcode-scope.formulario {
        max-width: 500px !important;
    }

    .ha-shortcode-scope .resultado-info {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 25px;
    }

    .ha-shortcode-scope .resultados-busqueda h2 {
        text-align: center;
        margin: 0 0 12px;
    }

    .ha-shortcode-scope .resultado-origen,
    .ha-shortcode-scope .resultado-destino {
        min-width: 0;
    }

    .ha-shortcode-scope .resultado-origen .ciudad,
    .ha-shortcode-scope .resultado-destino .ciudad {
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
        font-size: 13px;
        line-height: 1.15;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    #ha-resultados-wrapper.ha-shortcode-scope,
    .ha-shortcode-scope.horarios-autobus.container {
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 18px;
        padding: 0 12px;
    }

    .ha-shortcode-scope.formulario {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ha-shortcode-scope.horarios-autobus.container .resultados-busqueda,
    #ha-resultados-wrapper.ha-shortcode-scope .resultados-busqueda {
        flex: 0 0 calc(50% - 9px) !important;
        width: calc(50% - 9px) !important;
        max-width: calc(50% - 9px) !important;
        min-width: 0 !important;
    }

    .ha-shortcode-scope .resultados-busqueda h2 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .ha-shortcode-scope .resultado {
        padding: 16px 14px;
    }

    .ha-shortcode-scope .resultado-info {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .ha-shortcode-scope .resultado-detalles {
        align-items: center !important;
        gap: 10px !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
    }

    .ha-shortcode-scope .icono-tipo {
        max-width: 118px !important;
        margin: 0 auto !important;
    }

    .ha-shortcode-scope .logo-bus {
        max-height: 28px !important;
    }

    .ha-shortcode-scope .resultado-horario {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 12px !important;
        align-items: start !important;
        margin: 0 !important;
    }

    .ha-shortcode-scope .resultado-icono {
        margin: 0 !important;
        align-self: start !important;
        padding-top: 2px;
    }

    .ha-shortcode-scope .resultado-icono img {
        width: 34px;
    }

    .ha-shortcode-scope .resultado-duracion {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 800;
        white-space: nowrap;
    }

    .ha-shortcode-scope .resultado-origen,
    .ha-shortcode-scope .resultado-destino {
        align-items: center !important;
        text-align: center !important;
        justify-content: flex-start;
        gap: 4px;
        min-width: 0;
    }

    .ha-shortcode-scope .resultado-origen .ciudad,
    .ha-shortcode-scope .resultado-destino .ciudad {
        display: block;
        width: 100%;
        font-size: 14px;
        line-height: 1.15;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
    }

    .ha-shortcode-scope .resultado-hora {
        font-size: 18px;
        line-height: 1.1;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .ha-shortcode-scope .ha-results-actions {
        gap: 10px;
    }
}

@media only screen and (max-width: 767px) {
    #ha-resultados-wrapper.ha-shortcode-scope,
    .ha-shortcode-scope.horarios-autobus.container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        padding: 0 2px !important;
    }

    .ha-shortcode-scope.formulario {
        padding: 14px;
        margin: 0 auto 14px !important;
    }

    .ha-shortcode-scope .input-group {
        padding: 12px;
        margin-bottom: 10px;
    }

    .ha-shortcode-scope .resultados-busqueda {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .ha-shortcode-scope .resultados-busqueda h2 {
        font-size: 1.35rem;
        margin: 0 0 12px;
    }

    .ha-shortcode-scope .resultado {
        padding: 16px 14px;
        width: 100% !important;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .ha-shortcode-scope .resultado-info {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .ha-shortcode-scope .resultado-detalles {
        align-items: center !important;
        gap: 10px !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
    }

    .ha-shortcode-scope .icono-tipo {
        max-width: 118px !important;
        margin: 0 auto !important;
    }

    .ha-shortcode-scope .tipo-circulacion {
        text-align: center;
    }

    .ha-shortcode-scope .resultado-horario {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 14px !important;
        align-items: start !important;
        margin: 0 !important;
    }

    .ha-shortcode-scope .resultado-icono {
        margin: 0 !important;
        align-self: start !important;
        padding-top: 2px;
    }

    .ha-shortcode-scope .resultado-icono img {
        width: 36px;
    }

    .ha-shortcode-scope .resultado-duracion {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.1;
        font-weight: 800;
        white-space: nowrap;
    }

    .ha-shortcode-scope .resultado-origen,
    .ha-shortcode-scope .resultado-destino {
        align-items: center;
        text-align: center;
        justify-content: flex-start;
        gap: 4px;
    }

    .ha-shortcode-scope .resultado-origen .encabezado,
    .ha-shortcode-scope .resultado-destino .encabezado {
        font-size: 10px;
    }

    .ha-shortcode-scope .resultado-origen .ciudad,
    .ha-shortcode-scope .resultado-destino .ciudad {
        font-size: 14px;
        line-height: 1.15;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
        width: 100%;
    }

    .ha-shortcode-scope .resultado-hora {
        font-size: 18px;
        line-height: 1.1;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .ha-shortcode-scope .resultado-hora-badge {
        min-width: 24px;
        height: 20px;
        padding: 0 7px;
        font-size: 11px;
    }

    .ha-shortcode-scope .dias-container {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ha-shortcode-scope .dia {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
    }

    .ha-shortcode-scope .ha-results-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ha-shortcode-scope .ha-results-actions .btn-back,
    .ha-shortcode-scope .ha-results-actions .btn-pdf,
    .ha-shortcode-scope .resultado-comprar {
        width: 100%;
    }

    .ha-shortcode-scope .ha-tipo-viaje-container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .ha-shortcode-scope .ha-tipo-viaje-container .ha-radio-label {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 10px 8px;
        font-size: 13px;
        text-align: center;
    }
}

@media only screen and (max-width: 480px) {
    #ha-resultados-wrapper.ha-shortcode-scope,
    .ha-shortcode-scope.horarios-autobus.container {
        padding: 0 2px !important;
    }

    .ha-shortcode-scope.formulario {
        padding: 12px;
    }

    .ha-shortcode-scope .input-group {
        padding: 10px;
    }

    .ha-shortcode-scope select,
    .ha-shortcode-scope input[type="date"],
    .ha-shortcode-scope input[type="submit"] {
        font-size: 15px;
    }

    .ha-shortcode-scope .resultados-busqueda h2 {
        font-size: 1.2rem;
    }

    .ha-shortcode-scope .resultado {
        padding: 14px 12px;
    }

    .ha-shortcode-scope .resultado-horario {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        /* gap: 10px !important; */
    }

    .ha-shortcode-scope .icono-tipo {
        max-width: 92px !important;
    }

    .ha-shortcode-scope .resultado-origen .ciudad,
    .ha-shortcode-scope .resultado-destino .ciudad {
        font-size: 13px;
    }

    .ha-shortcode-scope .resultado-hora {
        font-size: 16px;
    }

    .ha-shortcode-scope .resultado-comprar,
    .ha-shortcode-scope .btn-back,
    .ha-shortcode-scope .btn-pdf {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ha-shortcode-scope .resultado-comprar {
        white-space: normal;
        line-height: 1.3;
    }
}
