/**
 * @author Alvaro Fuentes <alvaro.fuentes.zurita@gmail.com>
 */


/* ============================================================================================== */
/* Layout principal */
/* Contenedor nativo */
.w-auth.w-modal--native {
	background	: none;
	border		: none;
	padding		: 0;
}

.w-auth.w-modal--native::backdrop {
	background-color	: rgba(0, 0, 0, .4);
}

/* Contenedor */
.w-auth .w-modal {
	background		: #fcf6f2 no-repeat bottom;
	background-size	: contain;
	border-radius	: 1rem;
	box-shadow		: 0 0 1.5rem .5rem rgba(0, 0, 0, .4);
	display			: flex;
	flex-direction	: column;
	padding			: 1rem 1rem 2.5rem;
}

/* Marco */
.w-auth .w-modal__frame {
	display			: flex;
	justify-content	: flex-end;
}

.w-auth .w-modal__frame:not(:empty) {
	margin-bottom	: .5rem;
}

.w-auth .w-modal__frame .w-action {
	align-items			: center;
	background-color	: #f9efdc;
	border				: none;
	border-radius		: .5rem;
	cursor				: pointer;
	display				: flex;
	height				: 2rem;
	justify-content		: center;
	margin				: 0;
	padding				: 0;
	width				: 2rem;
}

.w-auth .w-modal__frame .w-action:not(:last-child) {
	margin-right	: .5rem;
}

.w-auth .w-modal__frame .w-action::before {
	-webkit-mask		: no-repeat center;
	-webkit-mask-size	: contain;
	background-color	: #d2b98e;
	content				: '';
	height				: 1rem;
	width				: 1rem;
}

.w-auth .w-modal__frame .w-action__label {
	display	: none;
}

/* Cabecera */
.w-auth .w-modal__header {
	align-items		: center;
	display			: flex;
	flex-direction	: column;
	margin-bottom	: 1rem;
	padding			: 0 1.5rem;
}

.w-auth .w-modal__title {
	margin	: 0;
}

.w-auth .w-modal__title-label {
	color			: #193c82;
	display			: block;
	font			: 700 2.3rem/2.3rem 'Dosis', sans-serif;
	text-align		: center;
	text-transform	: uppercase;
}

.w-auth .w-modal__title-label:not(:empty) {
	margin-bottom	: .5rem;
}

.w-auth .w-modal__subtitle {
	margin	: 0;
}

.w-auth .w-modal__subtitle-label {
	color			: #737373;
	display			: block;
	font			: 700 1.7rem/1.7rem 'Dosis', sans-serif;
	text-transform	: uppercase;
}

/* Cuerpo */
.w-auth .w-modal__body {
	align-content	: center;
	display			: flex;
	flex-wrap		: wrap;
	height			: 12rem;
	padding			: 0 3rem;
	width			: 37rem;
}

.w-auth .w-pair {
	margin-bottom	: .8rem;
	width			: 100%;
}

.w-auth .w-pair__label {
	display	: none;
}

.w-auth .w-pair__input {
	background			: #f9efdc no-repeat 1.1rem center / 1.7rem;
	border				: none;
	border-radius		: .5rem;
	font				: 1.4rem/1.4rem 'Dosis', sans-serif;
	height				: 3.2rem;
	margin				: 0;
	outline				: none;
	padding				: .4rem .7rem .4rem 3.5rem;
	text-transform		: uppercase;
	transition			: background-color ease 0.25s;
	width				: 100%;
}

.w-auth .w-pair .w-pair__input:focus {
	background-color	: #ffdaab;
}

.w-auth .w-pair--invalid .w-pair__input {
	background-color	: #ffb49f;
}

.w-auth .w-pair__input::placeholder {
	color	: #9a9a9a;
}

.w-auth .w-auth__username .w-pair__input {
	background-image	: url('./icon--usuario.svg');
}

.w-auth .w-auth__passphrase .w-pair__input {
	background-image	: url('./icon--llave.svg');
}

.w-auth .w-status {
	height		: 1.4rem;
	margin		: .4rem auto 0;
	min-width	: 1.4rem;
}

.w-auth .w-status__message {
	color			: #737373;
	font			: 600 1.2rem/1.4rem 'Dosis', sans-serif;
	opacity			: 0;
	text-transform	: uppercase;
	transition		: opacity ease 0.25s;
}

.w-auth .w-status__message:not(:empty) {
	opacity	: 1;
}

/* Pie */
.w-auth .w-modal__footer {
	display			: flex;
	justify-content	: center;
}

.w-auth .w-modal__footer:not(:empty) {
	margin-top	: 1.4rem;
}

.w-auth .w-modal__footer .w-action {
	align-items			: center;
	background-color	: #fff;
	border				: .2rem solid #d8d6d5;
	border-radius		: .5rem;
	cursor				: pointer;
	display				: flex;
	justify-content		: center;
	margin				: 0;
	padding				: .2rem 1.3rem;
	text-transform		: uppercase;
	transition			: background-color ease .25s, border-color ease .25s, color ease .25s;
}

.w-auth .w-modal__footer .w-action:focus {
	outline : none;
}

.w-auth .w-modal__footer .w-action--primary {
	background-color	: #4267bb;
	border-color		: #4267bb;
	color				: #fff;
}

.w-auth .w-modal__footer .w-action--disabled {
	background-color	: #ccc;
	border-color		: #ccc;
	color				: #aaa;
	cursor				: not-allowed;
}

.w-auth .w-modal__footer .w-action:not(:last-child) {
	margin-right	: 1rem;
}

.w-auth .w-modal__footer .w-action__label {
	font	: 600 1.2rem/1.2rem 'Dosis', sans-serif;
}

/* ============================================================================================== */
/* Reglas por acción en marco */
.w-auth .w-modal__frame .w-action.close::before {
	-webkit-mask-image	: url('./icon--equis.svg');
}

/* ============================================================================================== */
/* Reglas por aplicación/unidad */
/* Ficha */
[data-app-name="ficha"] .w-auth.w-modal--native {
	transform	: scale(.8);
}

[data-app-name="ficha"] .w-auth .w-modal {
	background-color	: #fff;
	background-image	: url('./bg--modal-ficha.svg');
}

[data-app-name="ficha"] .w-auth .w-modal__frame .w-action {
	background-color	: #bfd4d8;
}

[data-app-name="ficha"] .w-auth .w-modal__frame .w-action::before {
	background-color	: #2d6370;
}

/* Ambulatoria */
[data-unit-name="ambulatoria"] .w-auth .w-modal {
	background-image	: url('./bg--modal-ambulatoria.svg');
}

/* Hospitalización */
[data-unit-name="hospitalizacion"] .w-auth .w-modal {
	background-image	: url('./bg--modal-hospitalizacion.svg');
}

/* Servicios */
[data-unit-name="servicios"] .w-auth .w-modal {
	background-image	: url('./bg--modal-servicios.svg');
}

/* Urgencia */
[data-unit-name="urgencia"] .w-auth .w-modal {
	background-image	: url('./bg--modal-urgencia.svg');
}
