/* ============================================================
   modal.css — overlay, modal container e animações
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 24px;
  overflow-y: auto;
}
.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--c-surface);
  border: 0.5px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 24px;
  width: 100%;
  max-width: 580px;
  animation: modal-in 0.18s ease;
  flex-shrink: 0;
}
.modal.modal-lg { max-width: 820px; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 17px;
  font-weight: 500;
}
.modal-close {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--c-text-2);
  line-height: 1;
  transition: background 0.12s;
}
.modal-close:hover { background: var(--c-bg); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 0.5px solid var(--c-border);
}

/* Popup rápido de cadastro dentro de orçamento */
.inline-popup {
  background: var(--c-bg);
  border: 0.5px solid var(--c-border-md);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-top: 8px;
}
