/* MiVetOnline - cargador personalizado de fotografías v1.2.0 */

.mvo-cpu-native-hidden {
  display: none !important;
}

.mvo-cpu-uploader,
.mvo-cpu-uploader * {
  box-sizing: border-box;
}

.mvo-cpu-uploader {
  position: relative;
  width: 345px;
  max-width: 100%;
  margin: 0 0 26px;
}

.mvo-cpu-preview {
  width: 100%;
  min-height: 115px;
  margin-bottom: 24px;
  padding: 12px;
  border: 2px dashed #d6eaf0;
  border-radius: 18px;
  background: #fcfeff;
}

.mvo-cpu-empty {
  min-height: 87px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  color: #9aa8b0;
  font-size: 15px;
  font-style: italic;
}

.mvo-cpu-empty[hidden] {
  display: none !important;
}

.mvo-cpu-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mvo-cpu-preview-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
}

.mvo-cpu-preview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #e2e8ec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mvo-cpu-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 3;
  width: 27px;
  height: 27px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

.mvo-cpu-remove:disabled {
  opacity: 0.55;
  cursor: wait;
}

.mvo-cpu-box {
  width: 100%;
  min-height: 220px;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #35a8bc;
  border-radius: 24px;
  background: #f8fdff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.mvo-cpu-title {
  color: #168ca0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.mvo-cpu-subtitle {
  max-width: 280px;
  margin-top: 7px;
  color: #5f6f78;
  font-size: 14px;
  line-height: 1.45;
}

.mvo-cpu-actions {
  width: 100%;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mvo-cpu-button {
  position: relative;
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  overflow: hidden;
}

.mvo-cpu-button-primary {
  background: #168ca0;
  color: #fff;
  box-shadow: 0 5px 13px rgba(22, 140, 160, 0.22);
}

.mvo-cpu-button-secondary {
  border: 1px solid #b8dfe6;
  background: #fff;
  color: #168ca0;
}

.mvo-cpu-button:not(.is-disabled):hover {
  transform: translateY(-1px);
}

.mvo-cpu-button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mvo-cpu-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mvo-cpu-help {
  margin-top: 15px;
  color: #74838b;
  font-size: 12px;
  line-height: 1.45;
}

.mvo-cpu-counter {
  min-height: 20px;
  margin-top: 8px;
  color: #168ca0;
  font-size: 14px;
  font-weight: 700;
}

.mvo-cpu-status {
  min-height: 20px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.mvo-cpu-status[data-type="error"] {
  color: #b42318;
}

.mvo-cpu-status[data-type="loading"] {
  color: #52656f;
}

@media (max-width: 380px) {
  .mvo-cpu-actions {
    flex-direction: column;
  }

  .mvo-cpu-button {
    width: 100%;
  }
}


/* Capa de carga grande y visible */
.mvo-cpu-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(248, 253, 255, 0.94);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: wait;
}

.mvo-cpu-loading-overlay[hidden] {
  display: none !important;
}

.mvo-cpu-loading-card {
  width: min(290px, 100%);
  padding: 25px 22px 22px;
  text-align: center;
  border: 1px solid #cbe8ed;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
}

.mvo-cpu-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  display: block;
  border: 5px solid #d8eef2;
  border-top-color: #168ca0;
  border-radius: 50%;
  animation: mvo-cpu-spin 0.85s linear infinite;
}

.mvo-cpu-loading-title {
  color: #168ca0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.mvo-cpu-loading-detail {
  margin-top: 7px;
  color: #52656f;
  font-size: 14px;
  line-height: 1.45;
}

.mvo-cpu-loading-bar {
  position: relative;
  height: 7px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5f2f5;
}

.mvo-cpu-loading-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  border-radius: inherit;
  background: #168ca0;
  animation: mvo-cpu-loading-slide 1.05s ease-in-out infinite;
}

.mvo-cpu-uploader.is-uploading .mvo-cpu-preview,
.mvo-cpu-uploader.is-uploading .mvo-cpu-box {
  pointer-events: none;
  user-select: none;
}

@keyframes mvo-cpu-spin {
  to { transform: rotate(360deg); }
}

@keyframes mvo-cpu-loading-slide {
  0% { left: -45%; }
  55% { left: 55%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mvo-cpu-spinner,
  .mvo-cpu-loading-bar span {
    animation-duration: 1.8s;
  }
}
