/* ========================================
   Modals: Overlay, Content, Close Button
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;

  &.opened {
    display: flex;
  }
}

.modal-content {
  position: relative;
  background: var(--mg-color-initial);
  border-radius: var(--mg-control-radius);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--mg-color-secondary);
  line-height: 1;
  padding: 0.5rem;

  &:hover {
    opacity: 0.7;
  }
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mg-color-quinary);
}
