/* Manejo de estilos para componentes de utilidad -> modales, sheets, etc */

.modal-backdrop {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  /* backdrop-filter: blur(15px); */
  background-color: #00000091;
}

.modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  z-index: 50;
  border: 1px solid #ddd;
  max-height: 90vh;
  margin-left: auto;
  margin-right: auto;
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 30px 0 rgba(#000, 0.25);
  width: 100%;
}

/* tamaños de contenedor */

.modal-container.xs {
  max-width: 300px;
}

.modal-container.sm {
  max-width: 500px;
}

.modal-container.md {
  max-width: 700px;
}

.modal-container.lg {
  max-width: 900px;
}

/* Estilos de los contenedores de header, body y footer para tamaños pequeños */

.modal-container-header {
  padding: 12px 24px;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-container-title {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  font-weight: 500;
  font-size: 1.25rem;
}

.modal-container-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-container-footer {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #ddd;
  gap: 12px;
  position: relative;
  &:after {
    content: "";
    display: block;
    position: absolute;
    top: -51px;
    left: 24px;
    right: 24px;
    height: 50px;
    flex-shrink: 0;
    background-image: linear-gradient(to top, rgba(#fff, 0.75), transparent);
    pointer-events: none;
  }
}

.modal-button {
  padding: 10px 18px;
  border-radius: 8px;
  background-color: transparent;
  border: 0;
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s ease;

  &.is-ghost {
    &:hover,
    &:focus {
      background-color: #dfdad7;
    }
  }

  &.is-primary {
    background-color: #6366f1;
    color: #fff;
    &:hover,
    &:focus {
      background-color: #4f46e5;
    }
  }
}

.icon-button {
  padding: 0;
  border: 0;
  background-color: transparent;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.15s ease;

  &:hover,
  &:focus {
    background-color: #dfdad7;
  }
}


@media (max-width: 600px) {
	.modal-container-header {
		padding: 8px 16px;
	}
	.modal-container-body {
		padding: 16px;
	}
	.modal-container-footer {
		padding: 8px 16px;
	}
	.modal-button {
		padding: 8px 10px;
		font-weight: 400;
	}
}