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


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

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

/* Contenedor */
.w-dialog .w-modal {
    background: #fff;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    max-width: 54rem;
    min-width: 46rem;
    padding: 2rem 3rem;
}

/* 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 {
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    -webkit-mask: url(/assets/skins/lahuen/base/images/icon_close.svg) center no-repeat;
    -webkit-mask-size: contain;
    content: ' ';
    height: 1.4rem;
    width: 1.4rem;
    background-color: var(--primary-e-normal);
}

.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 .w-modal__title-label {
    display: flex;
    text-align: center;
    color: var(--primary-c-normal);
    font: 600 2.4rem 'Lato', sans-serif;
}

.w-dialog .w-modal__body .w-modal__title-label {
    display: flex;
    text-align: center;
    color: var(--gray-a);
    font: 1.8rem 'Open Sans', sans-serif;
}

.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: 0.1rem solid var(--primary-d-normal);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0.5rem 1.5rem;
    color: var(--primary-d-normal);
    font: 600 1.6rem 'Lato', sans-serif;
}

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

.w-dialog .w-modal__footer .w-action--primary {
    background-color: var(--primary-a-normal);
    border: none;
    color: #fff;
}

.w-dialog .w-modal__footer .w-action--primary:hover {
    background-color: var(--primary-a-light);
    transition: background-color 0.3s ease;
}

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

/* ============================================================================================== */
/* 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('/assets/skins/lahuen/base/images/emphasis_error.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('/assets/skins/lahuen/base/images/icon_close.svg');
}

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

[data-app-name="ehr"] .w-dialog .w-modal {
	background-color	: #fff;
}

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

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

/* Ficha */
[data-app-name="ficha"] .w-dialog.w-modal--native {
	transform	: scale(.8);
}

[data-app-name="ficha"] .w-dialog .w-modal {
	background-color	: #fff;
}

[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');
}
