/**
 * Visual layer for EducaCity's general login (gate).
 *
 * Loaded only from app/web/gate/index.php, after style.css and
 * entrance/res/styles.css, so its rules override the inherited layout
 * without modifying it.
 *
 * Shares its visual language with
 * entrance/res/styles_login_educacity.css (same background, radii, field
 * heights, shadows and breakpoints) without sharing files: the gate keeps
 * being an independent implementation, which is why the --EC_* tokens are
 * declared here too.
 *
 * All the background ambience is built with gradients and pseudo-elements:
 * no new graphic asset is added. The decorative elements use
 * pointer-events:none and are simplified on tablet and mobile.
 *
 * Fixed name on purpose: it does not use USE_LEGACY_CSS and has no .legacy
 * twin, same as style.css, which the gate already links with a fixed name.
 *
 * ICE-4678: the gate shows no banner. This sheet defines no rules for
 * #footer, .slide-container or .slider-image.
 *
 * app/web/gate/index.php is shared by every brand in this codebase. This
 * sheet is only linked when USE_APP_IN is EDUCA_CITY, EDUCATION_CITY or
 * CIUDADEDUCATIVA_NET; any other brand renders the pre-ICE-4678 gate and
 * never loads this file.
 */

:root {
	--EC_TEAL: 0, 171, 173;
	--EC_INK: #0c1f27;
	--EC_INK_SOFT: #5a7781;
	--EC_FIELD_TRIM: #edf2f4;
	--EC_FIELD_EDGE: rgba(12, 31, 39, 0.08);
	--EC_AMBER_HOVER: #ffc352;
}

/* ------------------------------------------------------------------ *
 *  Background ambience
 * ------------------------------------------------------------------ */

html {
	background-color: var(--COLOR_BLUE_1);
}

body {
	position: relative;
	min-height: 100vh;
	overflow-x: hidden;
	background-color: var(--COLOR_BLUE_1);
	background-image:
		radial-gradient(ellipse 72% 56% at 6% -14%, rgba(var(--EC_TEAL), 0.32), rgba(var(--EC_TEAL), 0) 58%),
		radial-gradient(ellipse 58% 48% at 110% 114%, rgba(var(--EC_TEAL), 0.26), rgba(var(--EC_TEAL), 0) 60%),
		radial-gradient(ellipse 130% 96% at 50% 46%, rgba(0, 62, 75, 0.52), rgba(0, 40, 50, 0) 72%),
		linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.24) 100%);
	background-repeat: no-repeat;
	font-family: var(--APP_FONT_FAMILY);
}

/* Wide sweep across the bottom of the page, matching the reference mockup. */
body:before {
	content: "";
	position: fixed;
	left: -30vw;
	right: -30vw;
	bottom: -64vh;
	height: 124vh;
	border-radius: 50%;
	background: radial-gradient(ellipse at 50% 100%,
		rgba(var(--EC_TEAL), 0.22) 0%,
		rgba(var(--EC_TEAL), 0.08) 40%,
		rgba(var(--EC_TEAL), 0) 68%);
	pointer-events: none;
	z-index: 0;
}

/* Abstract circles of different sizes, scattered across the canvas. */
body:after {
	content: "";
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
	z-index: 0;
	background-repeat: no-repeat;
	background-image:
		radial-gradient(circle closest-side, rgba(var(--EC_TEAL), 0.17), rgba(var(--EC_TEAL), 0)),
		radial-gradient(circle closest-side, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0)),
		radial-gradient(circle closest-side, rgba(var(--EC_TEAL), 0.13), rgba(var(--EC_TEAL), 0)),
		radial-gradient(circle closest-side, rgba(255, 255, 255, 0.040), rgba(255, 255, 255, 0)),
		radial-gradient(circle closest-side, rgba(var(--EC_TEAL), 0.11), rgba(var(--EC_TEAL), 0)),
		radial-gradient(circle closest-side, rgba(255, 255, 255, 0.030), rgba(255, 255, 255, 0));
	background-size:
		470px 470px,
		215px 215px,
		330px 330px,
		145px 145px,
		265px 265px,
		98px 98px;
	background-position:
		-150px 16%,
		77% 5%,
		95% 68%,
		8% 83%,
		25% -74px,
		61% 94%;
}

/* ------------------------------------------------------------------ *
 *  Page structure
 * ------------------------------------------------------------------ */

.main_container {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

#header {
	height: auto;
	flex: 0 0 auto;
	padding: 28px 44px;
	margin: 0;
	box-sizing: border-box;
	background-color: transparent;
}

.img_logo {
	width: 182px;
	max-width: 46vw;
	height: auto;
	display: block;
	margin: 0;
}

/* ------------------------------------------------------------------ *
 *  Access card
 * ------------------------------------------------------------------ */

.ec-gate {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 16px 26px 78px 26px;
	box-sizing: border-box;
}

/*
 * Two-column card: decorative illustration on the left and the form on
 * the right. Keeps overflow visible so #schools_container is never
 * clipped, which is why each column rounds its own corners.
 */
.ec-gate .ec-gate__card {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	width: 100%;
	max-width: 1020px;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
	border: 0;
	border-radius: 20px;
	box-shadow:
		0 1px 3px rgba(0, 0, 0, 0.24),
		0 28px 54px -16px rgba(0, 0, 0, 0.56),
		0 64px 120px -34px rgba(0, 0, 0, 0.52);
	background-color: var(--COLOR_BLUE_1_DARK_8);
	text-align: left;
	overflow: visible;
}

/* Decorative column ---------------------------------------------------- */

.ec-gate .ec-gate__aside {
	position: relative;
	flex: 0 0 44%;
	max-width: 44%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 46px 40px;
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 20px 0 0 20px;
	/*
	 * Deep-teal ambience, related to the general background but a shade
	 * lighter and more teal, so the column stands apart without feeling
	 * disconnected. Layers, top to bottom in the stacking order:
	 *   1. very faint amber accent, echoing the PNG's gold details;
	 *   2. cyan/teal halo behind the illustration;
	 *   3. diagonal base that ends exactly in the color of
	 *      .ec-gate__main, so the seam between columns dissolves instead
	 *      of cutting sharply. The diagonal works the same way once the
	 *      card stacks and the neighboring panel moves below it, so no
	 *      media query needs to touch it.
	 */
	background-color: #012b37;
	background-image:
		radial-gradient(circle 260px at 62% 74%, rgba(247, 172, 17, 0.10), rgba(247, 172, 17, 0) 72%),
		radial-gradient(circle 360px at 50% 44%, rgba(var(--EC_TEAL), 0.26), rgba(var(--EC_TEAL), 0) 74%),
		linear-gradient(135deg, #013642 0%, #012c38 50%, var(--COLOR_BLUE_1_DARK_8) 100%);
}

/*
 * Light-toned dot pattern, now that the panel is dark. Kept in the
 * bottom-left corner, away from the illustration's visual center, and very
 * subdued so it does not compete with it.
 */
.ec-gate .ec-gate__aside:before {
	content: "";
	position: absolute;
	left: 24px;
	bottom: 22px;
	width: 132px;
	height: 84px;
	background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1.4px, rgba(0, 0, 0, 0) 1.4px);
	background-size: 18px 18px;
	/*
	 * Same principle as the dot pattern on the institutional login: a
	 * radial mask anchored in the bottom-left corner, with the highest
	 * density there and a gradual falloff toward the top and right, so no
	 * straight edge remains recognizable.
	 */
	-webkit-mask-image: radial-gradient(ellipse 128% 120% at 0% 100%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.46) 38%, rgba(0, 0, 0, 0) 78%);
	mask-image: radial-gradient(ellipse 128% 120% at 0% 100%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.46) 38%, rgba(0, 0, 0, 0) 78%);
	/*
	 * Progressive enhancement: without mask support the pattern stays very
	 * faint, so it never reads as a rectangle.
	 */
	opacity: 0.28;
	pointer-events: none;
	z-index: 0;
}

@supports (mask-image: radial-gradient(#000, transparent)) or (-webkit-mask-image: radial-gradient(#000, transparent)) {
	.ec-gate .ec-gate__aside:before {
		opacity: 0.7;
	}
}

/*
 * Purely decorative illustration: it receives no events, is not
 * selectable and takes part in no logic. The markup marks it with alt=""
 * and aria-hidden="true".
 */
.ec-gate .ec-gate__illustration {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	max-width: 372px;
	height: auto;
	margin: 0;
	filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.42));
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

/* Form column ------------------------------------------------ */

.ec-gate .ec-gate__main {
	position: relative;
	flex: 1 1 340px;
	min-width: 0;
	padding: 52px 52px 48px 52px;
	box-sizing: border-box;
	background-image: linear-gradient(152deg,
		rgba(255, 255, 255, 0.055) 0%,
		rgba(255, 255, 255, 0.012) 34%,
		rgba(0, 0, 0, 0.03) 68%,
		rgba(0, 0, 0, 0.10) 100%);
	border-radius: 0 20px 20px 0;
}

.ec-gate .ec-gate__main:before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 260px;
	height: 200px;
	border-radius: 0 20px 0 0;
	background: radial-gradient(ellipse at 100% 0%, rgba(var(--EC_TEAL), 0.16), rgba(var(--EC_TEAL), 0) 68%);
	pointer-events: none;
	z-index: 0;
}

.ec-gate .ec-gate__title {
	position: relative;
	z-index: 1;
	margin: 0 0 32px 0;
	font-family: var(--APP_FONT_FAMILY);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.16;
	letter-spacing: -0.026em;
	color: var(--COLOR_WHITE);
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.ec-gate .ec-gate__form {
	position: relative;
	z-index: 1;
	margin: 0;
}

/* Fields --------------------------------------------------------------- */

.ec-gate .ec-gate__field {
	position: relative;
	margin: 0 0 16px 0;
}

.ec-gate .ec-gate__label {
	display: block;
	margin: 0 0 9px 0;
	font-family: var(--APP_FONT_FAMILY);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.005em;
	color: rgba(255, 255, 255, 0.76);
}

.ec-gate .ec-gate__control {
	display: flex;
	align-items: stretch;
	width: 100%;
	overflow: hidden;
	border: 0;
	border-radius: 10px;
	background-color: var(--COLOR_WHITE);
	box-sizing: border-box;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
	transition: box-shadow 0.16s ease;
}

.ec-gate .ec-gate__control:focus-within {
	box-shadow:
		0 1px 3px rgba(0, 0, 0, 0.24),
		0 0 0 3px rgba(var(--EC_TEAL), 0.45);
}

.ec-gate .ec-gate__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	min-width: 54px;
	border-right: 1px solid var(--EC_FIELD_EDGE);
	background-color: var(--EC_FIELD_TRIM);
	color: var(--EC_INK_SOFT);
	font-size: 16px;
}

.ec-gate .ec-gate__control input {
	flex: 1 1 auto;
	float: none;
	width: auto;
	min-width: 0;
	height: 54px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	font-family: var(--APP_FONT_FAMILY);
	font-size: 15px;
	color: var(--EC_INK);
	box-sizing: border-box;
	text-overflow: ellipsis;
}

.ec-gate .ec-gate__control input:focus {
	border: 0;
	outline: 0;
	box-shadow: none;
}

/*
 * #school_selected stays hidden by default: login.cied.js shows and hides
 * it when an institution is selected or cleared. Only its appearance is
 * defined here, never its display.
 */
.ec-gate .ec-gate__control #school_selected {
	cursor: pointer;
	font-weight: 600;
}

/* School search results ------------------------------------------------ *
 * The container is a sibling of .ec-gate__control inside .ec-gate__field,
 * the only positioned ancestor, so the dropdown matches the field's exact
 * width. No ancestor clips it with overflow. display is never set here:
 * login.cied.js drives it with hide()/fadeIn().
 * ---------------------------------------------------------------------- */

#schools_container {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 120;
	width: auto;
	max-height: 296px;
	margin-top: 10px;
	padding: 8px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	border: 0;
	border-radius: 14px;
	background-color: var(--COLOR_WHITE);
	box-shadow:
		0 2px 6px rgba(0, 0, 0, 0.18),
		0 26px 56px -14px rgba(0, 0, 0, 0.54);
	font-family: var(--APP_FONT_FAMILY);
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--EC_INK);
	text-align: left;
}

#schools_container .a_school {
	width: 100%;
	padding: 11px 14px;
	box-sizing: border-box;
	border-radius: 9px;
	font-size: 13.5px;
	line-height: 1.45;
	cursor: pointer;
	transition: background-color 0.12s ease;
}

#schools_container .a_school + .a_school {
	margin-top: 2px;
}

#schools_container .a_school .school_name {
	font-weight: 600;
	color: var(--EC_INK);
}

#schools_container .a_school .city {
	font-size: 12.5px;
	color: var(--EC_INK_SOFT);
}

#schools_container .a_school:hover {
	background-color: #fdf2d8;
}

/* Button ---------------------------------------------------------------- */

.ec-gate .ec-gate__actions {
	position: relative;
	z-index: 1;
	margin: 30px 0 0 0;
	text-align: center;
}

.ec-gate .ec-gate__actions .button_submit {
	display: block;
	width: 100%;
	min-height: 54px;
	height: auto;
	margin: 0;
	padding: 14px 20px;
	border: 1px solid var(--COLOR_YELLOW);
	border-radius: 10px;
	background: var(--COLOR_YELLOW);
	background-color: var(--COLOR_YELLOW);
	color: var(--COLOR_BLUE_1_DARK_15);
	font-family: var(--APP_FONT_FAMILY);
	font-size: 15px !important;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.005em;
	text-align: center;
	text-shadow: none;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: 0 12px 26px -8px rgba(247, 172, 17, 0.62);
	transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ec-gate .ec-gate__actions .button_submit:hover,
.ec-gate .ec-gate__actions .button_submit:focus {
	background: var(--EC_AMBER_HOVER);
	background-color: var(--EC_AMBER_HOVER);
	border-color: var(--EC_AMBER_HOVER);
	outline: 0;
}

.ec-gate .ec-gate__actions .button_submit:active {
	transform: translateY(1px);
}

#div_emergente {
	position: relative;
	z-index: 1;
	color: rgba(255, 255, 255, 0.82);
	font-family: var(--APP_FONT_FAMILY);
	font-size: 13.5px;
}

/*
 * The hidden iframe used by do_login (width/height=0 via attribute, no CSS
 * of its own) defaults to the browser's display:inline. Being the last
 * node in the body, that display:inline adds a line to the document flow
 * and produces ~15px of vertical overflow below the card. display:block
 * changes neither its size (still 0x0 via attribute) nor its behavior: it
 * only removes that phantom line.
 */
iframe#oculto {
	display: block;
}

/* ------------------------------------------------------------------ *
 *  Responsive
 *  Desktop: full composition. Tablet: simplified decoration.
 *  Mobile: decoration reduced to a minimum.
 * ------------------------------------------------------------------ */

@media only screen and (max-width: 900px) {
	body:before {
		display: none;
	}

	body:after {
		background-image:
			radial-gradient(circle closest-side, rgba(var(--EC_TEAL), 0.15), rgba(var(--EC_TEAL), 0)),
			radial-gradient(circle closest-side, rgba(255, 255, 255, 0.040), rgba(255, 255, 255, 0));
		background-size: 340px 340px, 150px 150px;
		background-position: -110px 8%, 92% 78%;
	}

	.ec-gate {
		padding: 14px 20px 54px 20px;
	}

	.ec-gate .ec-gate__aside {
		padding: 34px 30px;
	}

	.ec-gate .ec-gate__illustration {
		max-width: 300px;
	}

	.ec-gate .ec-gate__main {
		padding: 40px 34px 36px 34px;
	}
}

/*
 * Portrait tablet and below: single column. The illustration moves to the
 * top, capped in height so the form stays the primary element.
 */
@media only screen and (max-width: 820px) {
	/*
	 * Space between the logo and the card: the first margin to trim,
	 * before touching the card itself. Both values are overridden again
	 * in the 600px block, so this adjustment does not alter the
	 * already-approved state at <=600px.
	 */
	#header {
		padding: 18px 32px;
	}

	.ec-gate {
		padding: 8px 20px 38px 20px;
	}

	.ec-gate .ec-gate__card {
		flex-direction: column;
		border-radius: 18px;
	}

	.ec-gate .ec-gate__aside {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		padding: 20px 24px 16px 24px;
		border-radius: 18px 18px 0 0;
	}

	.ec-gate .ec-gate__aside:before {
		display: none;
	}

	.ec-gate .ec-gate__illustration {
		max-width: 190px;
	}

	.ec-gate .ec-gate__main {
		flex: 1 1 auto;
		width: 100%;
		padding: 26px 30px 24px 30px;
		border-radius: 0 0 18px 18px;
	}
}

@media only screen and (max-width: 600px) {
	body:after {
		display: none;
	}

	.main_container {
		width: 100%;
		margin: 0;
	}

	#header {
		padding: 18px 18px;
	}

	.img_logo {
		width: 146px;
	}

	.ec-gate {
		padding: 10px 14px 34px 14px;
	}

	.ec-gate .ec-gate__card {
		border-radius: 16px;
	}

	/* Mobile: the illustration is removed and the form takes over the card. */
	.ec-gate .ec-gate__aside {
		display: none;
	}

	.ec-gate .ec-gate__main {
		padding: 34px 24px 32px 24px;
		border-radius: 16px;
	}

	.ec-gate .ec-gate__main:before {
		display: none;
	}

	.ec-gate .ec-gate__title {
		font-size: 24px;
		margin-bottom: 26px;
	}
}

@media only screen and (max-width: 420px) {
	.ec-gate .ec-gate__main {
		padding: 28px 18px 26px 18px;
	}

	.ec-gate .ec-gate__title {
		font-size: 21px;
	}

	#schools_container {
		max-height: 240px;
	}
}

@media only screen and (max-height: 720px) and (min-width: 821px) {
	.ec-gate {
		padding: 12px 26px 32px 26px;
	}

	.ec-gate .ec-gate__aside {
		padding: 30px 32px;
	}

	.ec-gate .ec-gate__illustration {
		max-width: 296px;
	}

	.ec-gate .ec-gate__main {
		padding: 38px 44px 34px 44px;
	}

	.ec-gate .ec-gate__title {
		font-size: 28px;
		margin-bottom: 24px;
	}

	#schools_container {
		max-height: 210px;
	}
}
