/* All popup modal styles are prefixed with .popup- to avoid clashes */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
}
.popup-overlay.active {
  display: flex;
  opacity: 1;
}
.popup-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 25px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.3s;
}
.popup-overlay.active .popup-content {
  transform: scale(1);
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}
.popup-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #0056b3;
}
.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: background 0.2s;
}
.popup-close:hover {
  background: #f0f0f0;
  color: #222;
}
.popup-body {
  padding: 1.5rem;
}
.popup-instructions h4 {
  margin-bottom: 0.5rem;
  color: #333;
}
.popup-instructions ol,
.popup-instructions ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.popup-note {
  background: #e6f0ff;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #0056b3;
  margin-top: 1rem;
}
.popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #eee;
}
.popup-footer .btn {
  min-width: 100px;
}

/* Popup modal button styles (scoped to popup only) */
.popup-footer .btn,
.popup-content .btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.popup-footer .btn.primary,
.popup-content .btn.primary {
  background-color: #005aa7;
  color: white;
}

.popup-footer .btn.primary:hover,
.popup-content .btn.primary:hover {
  background-color: #003366;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.popup-footer .btn.outline,
.popup-content .btn.outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.popup-footer .btn.outline:hover,
.popup-content .btn.outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Responsive */
@media (max-width: 576px) {
  .popup-content {
    width: 98vw;
    margin: 1rem;
    padding: 0;
  }
  .popup-header, .popup-body, .popup-footer {
    padding: 1rem;
  }
  .popup-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}