/* hola Load Modal — modales AJAX (#holaModal1 / #holaModal2 / #holaModal3) */

#holaModal1.modal.show {
  z-index: var(--hola-z-modal) !important;
}

#holaModal2.modal.show {
  z-index: calc(var(--hola-z-modal) + 4) !important;
}

#holaModal3.modal.show {
  z-index: calc(var(--hola-z-modal) + 8) !important;
}

.modal-backdrop.hola-load-modal-backdrop--1.show {
  z-index: calc(var(--hola-z-modal) - 1) !important;
}

.modal-backdrop.hola-load-modal-backdrop--2.show {
  z-index: calc(var(--hola-z-modal) + 3) !important;
}

.modal-backdrop.hola-load-modal-backdrop--3.show {
  z-index: calc(var(--hola-z-modal) + 7) !important;
}

.hola-load-modal .modal-content {
  border: 1px solid var(--hola-border-light);
  border-radius: var(--hola-radius);
  box-shadow: var(--hola-shadow-modal);
  font-family: var(--hola-font-family-base);
}

.hola-load-modal__header {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--hola-border-light);
  padding: var(--hola-space-3) var(--hola-space-4);
  position: relative;
}

.hola-load-modal .hola-load-modal__close,
.loadTgaSolModal.modal .modal-content .headerModal .hola-load-modal__close,
.loadTgaSolModal .headerModal .hola-load-modal__close {
  flex-shrink: 0;
  margin-left: var(--hola-space-2);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--hola-color-danger);
  color: var(--hola-color-on-danger);
  font-size: var(--hola-font-size-h6);
  line-height: 1;
  font-weight: var(--hola-font-weight-medium);
  cursor: pointer;
  user-select: none;
  border: none;
  padding: 0;
  float: none;
  text-align: center;
  position: absolute;
  right: var(--hola-space-2);
  top: var(--hola-space-2);
  transition: background-color var(--hola-transition-fast);
}

.loadTgaSolModal.modal .modal-content .headerModal .hola-load-modal__close,
.loadTgaSolModal .headerModal .hola-load-modal__close {
  position: absolute;
  top: -1px;
  right: 10px;
  margin-left: 0;
}

.hola-load-modal__close:hover,
.loadTgaSolModal.modal .modal-content .headerModal .hola-load-modal__close:hover,
.loadTgaSolModal .headerModal .hola-load-modal__close:hover {
  background-color: var(--hola-color-danger);
  color: var(--hola-color-on-danger);
}

.hola-load-modal__close:focus-visible,
.loadTgaSolModal.modal .modal-content .headerModal .hola-load-modal__close:focus-visible,
.loadTgaSolModal .headerModal .hola-load-modal__close:focus-visible {
  outline: 2px solid var(--hola-color-primary);
  outline-offset: 2px;
}

.hola-load-modal .modal-body .hola-empty {
  margin: 0 auto;
}

.hola-load-modal__titles {
  flex: 1;
  min-width: 0;
  padding-right: var(--hola-space-3);
}

.hola-load-modal__tit1 {
  margin: 0;
  font-family: var(--hola-font-family-heading);
  font-size: var(--hola-font-size-h3);
  font-weight: var(--hola-font-weight-semibold);
  color: var(--hola-text-heading);
  line-height: var(--hola-line-height-tight);
}

.hola-load-modal__tit2 {
  font-size: var(--hola-font-size-sm);
  color: var(--hola-text-secondary);
  margin-top: var(--hola-space-1);
}

.hola-load-modal__tit2--hidden {
  display: none;
}

.hola-load-modal .modal-body {
  padding: var(--hola-space-4);
  color: var(--hola-text-primary);
}

/* Loading overlay — HolaLoadModal.loading(1|0) */

.hola-load-modal-loading {
  position: fixed;
  inset: 0;
  z-index: var(--hola-z-loader);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hola-bg-overlay);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hola-load-modal-loading--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  cursor: pointer;
}

.hola-load-modal-loading--leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hola-load-modal-loading__panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: calc(100vw - (var(--hola-space-3) * 2));
  min-height: 96px;
  cursor: default;
  padding: var(--hola-space-3) var(--hola-space-4);
  background: var(--hola-bg-card);
  border: 1px solid var(--hola-border-light);
  border-radius: var(--hola-radius);
  box-shadow: var(--hola-shadow-modal);
  opacity: 0;
  transform: scale(0.98) translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hola-load-modal-loading--visible .hola-load-modal-loading__panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hola-load-modal-loading--leaving .hola-load-modal-loading__panel {
  opacity: 0;
  transform: scale(0.98) translateY(6px);
}

.hola-load-modal-loading .hola-loading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--hola-space-3);
  width: auto;
  margin: 0;
  font-family: var(--hola-font-family-base);
}

.hola-load-modal-loading .hola-loading-visual {
  position: relative;
  display: block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
}

.hola-load-modal-loading .hola-loading-house {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 64px;
  max-width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
}

.hola-load-modal-loading .hola-loading-text {
  min-width: 0;
  font-size: var(--hola-font-size-base);
  font-weight: var(--hola-font-weight-light);
  line-height: var(--hola-line-height-base);
  color: var(--hola-text-primary);
}

@media (max-width: 420px) {
  .hola-load-modal-loading__panel {
    min-height: 88px;
    padding: var(--hola-space-3);
  }

  .hola-load-modal-loading .hola-loading {
    gap: 12px;
  }

  .hola-load-modal-loading .hola-loading-visual {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }

  .hola-load-modal-loading .hola-loading-house {
    width: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hola-load-modal-loading,
  .hola-load-modal-loading__panel {
    transition: none;
  }
}
