/**
 * @author Alvaro Fuentes <alvaro.fuentes.zurita@gmail.com>
 */


/* ============================================================================================== */
/* Layout principal */
/* Contenedor nativo */
.w-dialog.w-modal--native {
	background	: none;
	border		: none;
	padding		: 0;
}

.w-dialog.w-modal--native::backdrop {
	background-color	: rgba(0, 0, 0, .4);
}

/* Contenedor */
.w-dialog .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;
	max-width		: 45rem;
	min-width		: 30rem;
	padding			: 1rem 1rem 2.5rem;
}

/* Marco */
.w-dialog .w-modal__frame {
	display			: flex;
	justify-content	: flex-end;
}

.w-dialog .w-modal__frame:not(:empty) {
	margin-bottom	: .5rem;
}

.w-dialog .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-dialog .w-modal__frame .w-action:not(:last-child) {
	margin-right	: .5rem;
}

.w-dialog .w-modal__frame .w-action::before {
	-webkit-mask		: no-repeat center;
	-webkit-mask-size	: contain;
	background-color	: #d2b98e;
	content				: '';
	height				: 1rem;
	width				: 1rem;
}

.w-dialog .w-modal__frame .w-action__label {
	display	: none;
}

/* Cabecera */
.w-dialog .w-modal__header {
	align-items		: center;
	display			: flex;
	flex-direction	: column;
	margin-bottom	: 1rem;
	padding 		: 0 1.5rem;
}

.w-dialog .w-modal__header::before {
	background		: no-repeat center;
	background-size	: contain;
	content			: '';
	height			: 9rem;
	margin-bottom	: 1.5rem;
	width			: 9rem;
}

.w-dialog .w-modal__header--empty::before {
	margin-bottom	: 0;
}

.w-dialog .w-modal__title {
	margin	: 0;
}

.w-dialog .w-modal__title-label {
	color			: #193c82;
	display			: block;
	font			: 700 2rem/2rem 'Dosis', sans-serif;
	text-align		: center;
	text-transform	: uppercase;
}

.w-dialog .w-modal__title-label:not(:empty) {
	margin-bottom	: .5rem;
}

.w-dialog .w-modal__subtitle {
	margin	: 0;
}

.w-dialog .w-modal__subtitle-label {
	color			: #737373;
	display			: block;
	font			: 700 1.7rem/1.7rem 'Dosis', sans-serif;
	text-transform	: uppercase;
}

/* Cuerpo */
.w-dialog .w-modal__body {
	display			: flex;
	flex			: 1;
	flex-wrap		: wrap;
	justify-content	: center;
	padding 		: 0 3rem;
}

.w-dialog__message {
	font		: 1.4rem/1.4rem 'Open Sans', sans-serif;
	margin		: 0;
	text-align	: center;
}

/* Pie */
.w-dialog .w-modal__footer {
	display			: flex;
	justify-content	: center;
}

.w-dialog .w-modal__footer:not(:empty) {
	margin-top	: 2rem;
}

.w-dialog .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;
}

.w-dialog .w-modal__footer .w-action:focus {
	outline : none;
}

.w-dialog .w-modal__footer .w-action--primary {
	background-color	: #4267bb;
	border-color		: #4267bb;
	color				: #fff;
}

.w-dialog .w-modal__footer .w-action:not(:last-child) {
	margin-right	: 1rem;
}

.w-dialog .w-modal__footer .w-action__label {
	font	: 600 1.2rem/1.2rem 'Dosis', sans-serif;
}

/* ============================================================================================== */
/* Reglas por icono */
.w-dialog--info-icon .w-modal__header::before {
	background-image	: url('./emphasis--i.svg');
}

.w-dialog--warning-icon .w-modal__header::before {
	background-image	: url('./emphasis--exclamacion.svg');
}

.w-dialog--error-icon .w-modal__header::before {
	background-image	: url('./emphasis--equis.svg');
}

.w-dialog--question-icon .w-modal__header::before {
	background-image	: url('./emphasis--interrogacion.svg');
}

/* ============================================================================================== */
/* Reglas por acción en marco */
.w-dialog .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-dialog.w-modal--native {
	transform	: scale(.8);
}

[data-app-name="ficha"] .w-dialog .w-modal {
	background-color	: #fff;
	background-image	: url('./bg--modal-ficha.svg');
}

[data-app-name="ficha"] .w-dialog .w-modal__frame .w-action {
	background-color	: #bfd4d8;
}

[data-app-name="ficha"] .w-dialog .w-modal__frame .w-action::before {
	background-color	: #2d6370;
}

/* Ambulatoria */
[data-unit-name="ambulatoria"] .w-dialog .w-modal {
	background-image	: url('./bg--modal-ambulatoria.svg');
}

/* Hospitalización */
[data-unit-name="hospitalizacion"] .w-dialog .w-modal {
	background-image	: url('./bg--modal-hospitalizacion.svg');
}

/* Servicios */
[data-unit-name="servicios"] .w-dialog .w-modal {
	background-image	: url('./bg--modal-servicios.svg');
}

/* Urgencia */
[data-unit-name="urgencia"] .w-dialog .w-modal {
	background-image	: url('./bg--modal-urgencia.svg');
}
