/**
 * Dialoghi modali (sostituiscono alert/confirm nativi).
 * Usabile con theme partner o pagine admin standalone.
 */
.cg-dialog {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: #0d2137;
}

.cg-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, 0.55);
  backdrop-filter: blur(2px);
}

.cg-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(85vh, 560px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cg-dialog-title {
  margin: 0;
  padding: 1.1rem 1.25rem 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0d2137;
}

.cg-dialog-body {
  padding: 0.35rem 1.25rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1a3a52;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.cg-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem 1.1rem;
  border-top: 1px solid #e5e8ec;
  background: #f8f9fa;
}

.cg-dialog .cg-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cg-dialog .cg-dialog-btn:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.cg-dialog .cg-dialog-btn--primary {
  background: #0d2137;
  color: #fff;
  border-color: #0d2137;
}

.cg-dialog .cg-dialog-btn--primary:hover {
  background: #1a3a52;
  border-color: #1a3a52;
}

.cg-dialog .cg-dialog-btn--outline {
  background: transparent;
  color: #0d2137;
  border-color: #0d2137;
}

.cg-dialog .cg-dialog-btn--outline:hover {
  background: #0d2137;
  color: #fff;
}

.cg-dialog .cg-dialog-btn--danger {
  background: #c41e3a;
  color: #fff;
  border-color: #c41e3a;
}

.cg-dialog .cg-dialog-btn--danger:hover {
  background: #a01830;
  border-color: #a01830;
}
