/* Ajustes para celular y tablet del Simulador de Sueldos SADOP.
 * Solo actua en pantallas de hasta 1100 px (celulares, tablets, iPad apaisado): en escritorio no cambia nada.
 * Bloque 1: maquetado antiguo de 994 px (ayudas, ley, diferenciales, contactos, consultas, simulador).
 * Bloque 2: formularios y resultados con Bootstrap (dipe_web, ley_web, calculadores). */

@media (max-width: 1100px) {
	/* ---- Bloque 1: maquetado antiguo ---- */
	body { font-size: 14px; }
	.header { width: auto; height: auto; padding: 10px 10px 0; background: none; }
	.header .region { float: none; width: auto; height: auto; margin: 0 0 10px; background: none; text-align: center; }
	.header .region select { width: 100%; max-width: 340px; margin: 0; min-height: 44px; font-size: 16px; }
	.header .currentRegion { display: none; }
	.header a { float: none; margin: 0; }
	.header > a { display: block; text-align: center; }
	.header > a img { max-width: 55%; height: auto; }
	.header .menu { float: none; clear: both; width: auto; height: auto; margin: 8px 0; position: static;
		display: -webkit-box; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; justify-content: center; }
	.header .menu a, .header .menu a.start, .header .menu a.nostart { position: static; display: block !important; float: none;
		width: auto !important; height: auto !important; min-height: 44px; line-height: 44px; margin: 3px !important; padding: 0 14px;
		left: auto; top: auto; text-indent: 0 !important; text-align: center; font-size: 13px; line-height: 44px !important; background: #007da5 !important; border-radius: 6px; }
	.header .menu a span, .header .menu a .school { display: inline; margin: 0 !important; padding: 0 !important; line-height: 44px; }
	.header .slider { display: none; }
	.mainWrapper, .footer, .bannerWrapper { width: auto; margin: 0; }
	.wrapper { width: auto; display: block; margin: 0; padding: 10px 8px; }
	.tabla-ayuda { width: auto; padding: 12px; box-sizing: border-box; }
	.tabla-ayuda p { width: auto; }
	.footer { height: auto; background-image: none !important; }
	.footer .disclaimer, .footer .banner { float: none; width: auto; margin: 20px 12px; }
	.footer .copyright { margin-top: 20px; }

	/* formularios armados con tablas (ley, diferenciales): una columna */
	form#frmCalc table, form#frmCalc tbody, form#frmCalc tr, form#frmCalc td { display: block; width: auto !important; box-sizing: border-box; }
	.wrapper form#frmCalc table { margin: 0 0 8px; }
	form#frmCalc td { padding: 6px 4px; }
	.wrapper form select, .wrapper form input[type=text] { width: 100% !important; max-width: 100%; box-sizing: border-box; min-height: 44px; font-size: 16px; }
	form#frmCalc label { display: block; margin-bottom: 4px; }
	.wrapper form input[type=radio], .wrapper form input[type=checkbox] { width: 22px; height: 22px; margin: 8px 8px 8px 0; vertical-align: middle; }
	.wrapper form button, .wrapper form input[type=submit], .wrapper form input[type=reset] { float: none; min-height: 44px; font-size: 16px; margin: 6px 6px 6px 0; }
	.wrapper form input[name=regdom] { min-width: 56px; min-height: 44px; font-size: 16px; margin: 2px 6px 2px 0; }
	.container-botones { width: auto; height: auto; background: none; padding-top: 10px; }
	.container-botones button { float: none; width: 100%; max-width: 320px; margin: 6px auto; }
	.container-botones .boton1, .container-botones .boton2 { float: none; margin: 6px auto; }

	/* diferenciales: el HTML mal anidado deja form#frmCalc vacio y las tablas fuera de el, asi que se eligen por clase (sim-form, sim-botones) */
	table.sim-form, table.sim-form tbody, table.sim-form tr, table.sim-form td,
	table.sim-botones, table.sim-botones tbody, table.sim-botones tr, table.sim-botones td { display: block; width: auto !important; box-sizing: border-box; }
	table.sim-form { margin: 0 0 8px; border: 0; }
	table.sim-form td { padding: 6px 4px; }
	table.sim-form select, table.sim-form input[type=text] { width: 100% !important; max-width: 100%; box-sizing: border-box; min-height: 44px; font-size: 16px; }
	table.sim-form input[type=radio] { width: 22px; height: 22px; margin: 8px 8px 8px 0; vertical-align: middle; }
	table.sim-form input[name=regdom] { min-width: 56px; min-height: 44px; font-size: 16px; margin: 2px 6px 2px 0; }
	table.sim-botones { margin: 0 auto; }
	table.sim-botones td { padding: 6px 0; text-align: center; }
	table.sim-botones button { width: 100%; max-width: 320px; min-height: 44px; font-size: 16px; white-space: normal; }
}

@media (max-width: 1100px) {
	/* ---- Bloque 2: Bootstrap (dipe_web, ley_web) ---- */
	.form-control { font-size: 16px; min-height: 44px; height: auto; }
	.btn { min-height: 44px; font-size: 16px; }
	button, input[type=button], input[type=submit], input[type=reset] { min-height: 44px; font-size: 16px; }
	button[name=descargar_pdf] { min-height: 0; }
	input[name=regdom] { min-width: 56px; min-height: 44px; font-size: 16px; margin: 2px 6px 2px 0; }
}

@media (max-width: 991px) {
	.form-horizontal .control-label { text-align: left; }
	/* el formulario no contenia sus columnas flotantes: el boton CALCULAR quedaba fuera y tapado por el bloque siguiente (tablet 768) */
	form#frmCalc::after { content: ""; display: table; clear: both; }
}

@media (max-width: 1100px) {
	/* cabecera y menu lateral con areas tactiles de al menos 44 px */
	button#showRight, .navbar-toggle { min-width: 44px; min-height: 44px; }
	button.tituloSeccional { min-height: 44px; padding: 0 12px; }
	.navbar-header a, .navbar-brand { display: inline-block; min-height: 44px; }
	.cbp-spmenu a { display: block; min-height: 44px; padding: 12px 10px !important; box-sizing: border-box; }
	a.ayuda { display: inline-block; min-height: 44px; line-height: 44px; }

}

@media (max-width: 991px) {
	/* resultado: la tabla ancha se desplaza dentro de su contenedor y no ensancha la pagina */
	.sim-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: calc(100vw - 24px); }
	.sim-scroll table { font-size: 13px; margin-left: 0; border-spacing: 3px !important; }
	.sim-scroll td { padding: 3px 4px !important; }
	#encabezado_pdf { width: 100%; }
	#encabezado_pdf h1 { font-size: 18px !important; line-height: 1.25; word-wrap: break-word; }
	#botones_pdf { border-spacing: 12px 0 !important; }
}

@media (max-width: 1100px), (pointer: coarse) {
	/* autocompletar (jQuery UI): items con alto tactil, dentro de la pantalla */
	ul.ui-autocomplete { text-align: left; max-width: calc(100vw - 16px); box-sizing: border-box; max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; font-size: 16px; }
	ul.ui-autocomplete li.ui-menu-item a, ul.ui-autocomplete li .ui-menu-item-wrapper { display: block; padding: 12px 10px; line-height: 1.3; white-space: normal; }
}
