/* Cotizar Sidebar — panel lateral con el formulario del ERP. Mobile-first. */
.cotizar-sidebar {
  position: fixed;
  inset: 0;
  z-index: 10000;
}
.cotizar-sidebar[hidden] { display: none; }

.cotizar-sidebar__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cotizar-sidebar__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 600px;
  background: #fff;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  animation: cotizar-slide-in 0.28s ease;
}
@keyframes cotizar-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cotizar-sidebar__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.cotizar-sidebar__close:hover { background: #e02b20; }

.cotizar-sidebar__content {
  flex: 1;
  position: relative;
  overflow: hidden;
}
/* Spinner mientras carga el iframe */
.cotizar-sidebar__content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid #e0e0e0;
  border-top-color: #e02b20;
  border-radius: 50%;
  animation: cotizar-spin 0.8s linear infinite;
}
.cotizar-sidebar__content--loaded::before { opacity: 0; animation: none; }
@keyframes cotizar-spin { to { transform: rotate(360deg); } }

.cotizar-sidebar__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.cotizar-sidebar__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.cotizar-sidebar__error a {
  color: #e02b20;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .cotizar-sidebar__panel { animation: none; }
  .cotizar-sidebar__content::before { animation: none; }
}
