/* --- Custom Spinner Moderno --- */
.custom-spinner-container,
.glass-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.custom-spinner-container {
  min-width: 220px;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12);
  transition: box-shadow 0.3s;
}

.custom-spinner {
  margin-bottom: 18px;
}

.spinner-svg {
  display: block;
  width: 64px;
  height: 64px;
}

.spinner-bg {
  stroke: #e0e0e0;
  stroke-width: 4;
}

.spinner-fg {
  stroke: url(#spinner-gradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125;
  stroke-dashoffset: 100;
  animation: spinner-rotate 1.2s linear infinite;
}

@keyframes spinner-rotate {
  0% {
    stroke-dashoffset: 125;
    transform: rotate(0deg);
  }
  50% {
    stroke-dashoffset: 60;
    transform: rotate(180deg);
  }
  100% {
    stroke-dashoffset: 125;
    transform: rotate(360deg);
  }
}

.custom-spinner-text,
.glass-spinner-text,
.minimal-spinner-text {
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.custom-spinner-text {
  font-size: 1.2rem;
  color: #222;
  opacity: 0.95;
}

.glass-spinner-text {
  font-size: 1.3rem;
  color: #222;
  font-family: 'Lato', 'Source Sans Pro', Arial, sans-serif;
  text-shadow: 0 2px 8px #fff;
  opacity: 0.92;
  font-weight: 600;
}

.minimal-spinner-text {
  font-size: 1.1rem;
  color: #1976d2;
  text-shadow: 0 2px 8px #000;
  opacity: 0.95;
}

/* --- Spinner Circular Minimalista --- */
.minimal-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.spinner-svg.spinner-small {
  width: 48px;
  height: 48px;
  animation: spinner-rotate 1s linear infinite;
}

.spinner-path {
  stroke-linecap: round;
  stroke-width: 4;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  fill: none;
  animation: spinner-dash 1.5s ease-in-out infinite;
}

/* Color Modifiers */
.spinner-color-light { stroke: #fff; }
.spinner-color-primary { stroke: #1976d2; }
.spinner-color-info { stroke: #00eaff; }
.spinner-color-dark { stroke: #3c8dbc; }

@keyframes spinner-dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* --- Dots Spinner (Glass Effect) --- */
.dots-spinner {
  display: inline-block;
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.dots-spinner div {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #00c0ef;
  border-radius: 50%;
  animation: dots-spinner 1.2s linear infinite;
  opacity: 0.3;
  transition: background 0.2s;
}

.dots-spinner div:nth-child(1) { top: 2px; left: 19px; animation-delay: 0s; opacity: 1; }
.dots-spinner div:nth-child(2) { top: 7px; left: 32px; animation-delay: -0.15s; }
.dots-spinner div:nth-child(3) { top: 19px; left: 38px; animation-delay: -0.3s; }
.dots-spinner div:nth-child(4) { top: 32px; left: 32px; animation-delay: -0.45s; }
.dots-spinner div:nth-child(5) { top: 38px; left: 19px; animation-delay: -0.6s; }
.dots-spinner div:nth-child(6) { top: 32px; left: 7px;  animation-delay: -0.75s; }
.dots-spinner div:nth-child(7) { top: 19px; left: 2px;  animation-delay: -0.9s; }
.dots-spinner div:nth-child(8) { top: 7px; left: 7px;   animation-delay: -1.05s; }

@keyframes dots-spinner {
  0%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
  60% { opacity: 0.3; }
}

/* --- Modal Loading Style --- */
#loadingModal {
  transition: opacity 0.3s;
}

#loadingModal .modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.modal-backdrop,
.loading-modal-bg {
  background: rgba(0, 0, 0, 0.18) !important;
  transition: background 0.3s;
}

.custom-loading-modal {
  background: rgba(255, 255, 255, 0.01) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: background 0.3s;
}

.custom-loading-content {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12);
  border-radius: 0px 30px 30px 30px;
  padding: 24px 32px;
  min-width: 380px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* --- Responsivo --- */
@media (max-width: 600px) {
  .custom-loading-content {
    min-width: 180px;
    min-height: 100px;
    padding: 16px 12px 12px 12px;
  }

  .dots-spinner {
    width: 32px;
    height: 32px;
  }

  .dots-spinner div {
    width: 6px;
    height: 6px;
  }

  .glass-spinner-text {
    font-size: 0.95rem;
  }
}