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


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

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

/* Contenedor */
.w-multi-found-selector .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-multi-found-selector .w-modal__frame {
	display			: flex;
	justify-content	: flex-end;
}

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

.w-multi-found-selector .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-multi-found-selector .w-modal__frame .w-action:not(:last-child) {
	margin-right	: .5rem;
}

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

.w-multi-found-selector .w-modal__frame .w-action__label {
	display	: none;
}

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

.w-multi-found-selector .w-modal__title {
	margin	: 0;
}

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

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

.w-multi-found-selector .w-modal__subtitle {
	margin	: 0;
}

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

/* Cuerpo */
.w-multi-found-selector .w-modal__body {
	display			: flex;
	flex			: 1;
	flex-direction	: column;
	padding			: 0 3rem;
}

/* Barra de paneles */
.w-multi-found-selector__tabbar {
	align-items	: flex-end;
	display		: flex;
	padding		: 0 1.1rem;
}

.w-multi-found-selector__tabbar .w-action {
	background-color	: rgba(220, 225, 239, .5);
	border				: none;
	border-radius		: .6rem .6rem 0 0;
	padding				: .6rem 1.1rem .5rem;
	position			: relative;
	text-transform		: uppercase;
	transition			: background-color ease .25s, color ease .25s;
}

.w-multi-found-selector__tabbar .w-action:not(:last-child) {
	margin-right	: .3rem;
}

.w-multi-found-selector__tabbar .w-action::before, .w-multi-found-selector__tabbar .w-action::after {
	background		: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 85.04 85.04"><path fill="%23dce1ef" fill-opacity=".5" d="M0,0.001V85.04H85.04C38.074,85.04,0,46.968,0,0.001z"/></svg>') no-repeat;
	background-size	: contain;
	bottom			: 0;
	content			: '';
	height			: .6rem;
	position		: absolute;
	transition		: background-image ease .25s;
	width			: .6rem;
}

.w-multi-found-selector__tabbar .w-action::before {
	left		: -.6rem;
	transform	: scaleX(-1);
}

.w-multi-found-selector__tabbar .w-action::after {
	right	: -.6rem;
}

.w-multi-found-selector__tabbar .w-action--selected {
	background-color	: #dce1ef;
	z-index				: 2;
}

.w-multi-found-selector__tabbar .w-action--selected::before,
.w-multi-found-selector__tabbar .w-action--selected::after {
	background-image	: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 85.04 85.04"><path fill="%23dce1ef" d="M0,0.001V85.04H85.04C38.074,85.04,0,46.968,0,0.001z"/></svg>');
}

.w-multi-found-selector__tabbar .w-action__label {
	color		: rgba(25, 60, 130, .5);
	font		: 600 1.15rem/1.15rem 'Dosis', sans-serif;
	transition	: color ease .25s;
}

.w-multi-found-selector__tabbar .w-action--selected .w-action__label {
	color	: #193c82;
}

/* Panel */
.w-multi-found-selector__tabbed-pane {
	display	: flex;
}

.w-multi-found-selector .w-panel {
	border-radius	: .6rem;
	height			: 37rem;
	padding			: 1rem;
	position		: relative;
	width			: 38rem;
}

.w-multi-found-selector .w-panel::before {
	align-items		: center;
	color			: #c4c4c4;
	content			: attr(data-placeholder);
	display			: none;
	font			: italic 1.4rem/1.8rem 'Open Sans', sans-serif;
	height 			: 100%;
	justify-content	: center;
	padding 		: 4rem;
	pointer-events	: none;
	position		: absolute;
	right			: 0;
	text-align		: center;
	top				: 0;
	width			: 100%;
}

.w-multi-found-selector .w-panel:not(:last-child) {
	margin-right	: 4rem;
}

.w-multi-found-selector .w-panel:not(:last-child)::after {
	-webkit-mask		: no-repeat center;
	-webkit-mask-size	: contain;
	background-color	: #b8c2e0;
	content				: '';
	height				: 8rem;
	position			: absolute;
	right				: -3.1rem;
	top					: calc(50% - 8rem / 2);
	width				: 2.1rem;
}

.w-multi-found-selector .w-panel__title {
	margin	: .3rem 0 1rem .6rem;
}

.w-multi-found-selector .w-panel__title-label {
	color			: #c4c4c4;
	font			: 1.3rem/1.3rem 'Dosis', sans-serif;
	text-transform	: uppercase;
}

/* Input de búsqueda */
.w-multi-found-selector .w-typeahead {
	display		: inline-block;
	min-width	: 100%;
	position	: relative;
}

.w-multi-found-selector .w-typeahead__input {
	border			: none;
	border-radius	: .6rem;
	font			: 1.3rem/1.3rem 'Open Sans', sans-serif;
	margin			: 0 0 .5rem;
	min-width		: 100%;
	padding			: .4rem .6rem;
}

.w-multi-found-selector .w-typeahead__input::placeholder {
	color		: #c4c4c4;
	font-style	: italic;
}

.w-multi-found-selector .w-typeahead .w-action {
	align-items			: center;
	background-color	: #dce1ef;
	border				: none;
	border-radius		: 100%;
	display				: none;
	height				: 1.4rem;
	justify-content		: center;
	outline				: none;
	padding				: 0;
	position			: absolute;
	right				: .5rem;
	top					: .55rem;
	width				: 1.4rem;
}

.w-multi-found-selector .w-typeahead .w-action::after {
	color	: #fff;
	font	: .9rem/.9rem 'Open Sans', sans-serif;
}

.w-multi-found-selector .w-typeahead .w-action.clean::after {
	content	: 'X';
}

.w-multi-found-selector .w-typeahead .w-action:hover,
.w-multi-found-selector .w-typeahead__input:hover + .w-action {
	display	: flex;
}

.w-multi-found-selector .w-typeahead .w-action__label {
	display	: none;
}

.w-multi-found-selector .w-typeahead .w-selector {
	background-color	: #dce1ef;
	list-style			: none;
	margin				: 0;
	padding				: 0;
}

.w-multi-found-selector .w-typeahead .w-selector__item {
	border-bottom	: .2rem solid #b8c2e0;
	cursor			: pointer;
	padding			: 1rem .6rem;
	transition		: background-color ease 0.25s;
}

.w-multi-found-selector .w-typeahead .w-selector__item:hover,
.w-multi-found-selector .w-typeahead .w-selector__item--selected {
	background-color	: #b8c2e0;
}

.w-multi-found-selector .w-typeahead .w-selector__item-label {
	font	: 1.3rem/1.3rem 'Open Sans', sans-serif;
}

/* Lista */
.w-multi-found-selector .w-list {
	list-style	: none;
	margin		: 0;
	padding		: 0;
}

.w-multi-found-selector .w-list__item {
	align-items		: center;
	border-bottom	: .2rem solid;
	display			: flex;
	justify-content	: space-between;
	padding			: 1rem .6rem;
	transition		: background-color ease 0.25s;
}

.w-multi-found-selector .w-list__item-label {
	font	: 1.3rem/1.3rem 'Open Sans', sans-serif;
}

.w-multi-found-selector .w-list__item-actions {
	align-items		: center;
	display			: flex;
	justify-content	: center;
	padding-left	: .5rem;
}

.w-multi-found-selector .w-list__item-actions .w-action {
	background-color	: transparent;
	border				: none;
	display				: flex;
	height				: 1rem;
	padding				: 0;
	width				: 1rem;
}

.w-multi-found-selector .w-list__item-actions .w-action::before {
	-webkit-mask		: no-repeat center;
	-webkit-mask-size	: contain;
	content				: '';
	height				: 1rem;
	width				: 1rem;
}

.w-multi-found-selector .w-list__item-actions .w-action__label {
	display	: none;
}

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

.w-multi-found-selector .w-modal__footer:not(:empty) {
	margin-top	: 2rem;
}

.w-multi-found-selector .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-multi-found-selector .w-modal__footer .w-action:focus {
	outline : none;
}

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

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

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

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

/* ============================================================================================== */
/* Reglas por paneles */
/* Panel de búsqueda */
.w-multi-found-selector .search-panel {
	background-color	: #dce1ef;
}

.w-multi-found-selector--empty-search-pattern .search-panel::before {
	display	: flex;
}

.w-multi-found-selector .search-panel.w-panel::after {
	-webkit-mask-image	: url('./icon--flecha-plana-derecha.svg');
}

/* Panel de encontrados */
.w-multi-found-selector .found-panel {
	background-color	: #fff;
	overflow-y			: auto;
}

.w-multi-found-selector--empty-found-list .found-panel::before {
	display	: flex;
}

.w-multi-found-selector .found-panel .w-list__item {
	border-bottom-color	: #e9f0f7;
}

.w-multi-found-selector .found-panel .w-list__item:hover {
	background-color	: #e9f0f7;
}

.w-multi-found-selector .found-panel .w-list__item-actions .w-action::before {
	background-color	: #c9d3e3;
}

.w-multi-found-selector .found-panel .w-list__item-actions .remove::before {
	-webkit-mask-image	: url('./icon--equis.svg');
}

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

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

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

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

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

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

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

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