/* ─── DRAWER — CriSistemas ─── */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 50, 80, 0.5);
  backdrop-filter: blur(3px);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 580px;
  background: #ffffff;
  z-index: 3001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
}

.drawer-panel.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: #008fc5;
  flex-shrink: 0;
}

.drawer-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.drawer-close {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
}

.drawer-close:hover {
  background: rgba(255,255,255,0.25);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.drawer-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.drawer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #008fc5;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  gap: 12px;
}

.drawer-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #b2dded;
  border-top-color: #008fc5;
  border-radius: 50%;
  animation: drawerSpin 0.8s linear infinite;
}

@keyframes drawerSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .drawer-panel {
    max-width: 100%;
  }
}
